User:Java

From Facebook Developer Wiki

Jump to: navigation, search

Contents

[edit] Java Libraries

Facebook does not have an "official" library developed by the Facebook Platform team ( see here ) but there are several Java libraries that are very well developed and frequently updated.

[edit] Facebook-Java-Api

Currently, the most active and mature Facebook Java API is an open-source project built around what was previously the official Facebook Java client.

Please visit the project's homepage and follow links to the getting started documentation and active forum where you can post Java-related questions.

http://code.google.com/p/facebook-java-api/

- Updated 7th March 2009 by David Boden

[edit] TinyFBClient and TinyFBTagLib

Added April 15th 2009.

TinyFBClient - A very small, but powerful Facebook Java client.

TinyFBTaglib - Tags that can be added to JSP pages to call the Facebook API.

Usage and how-to (includes Google App Engine support): Social Java Site.

Support and discussion: Social Java: Facebook Group

App created with tags. Give it a try! Shout Out

Let me know what you think, Carmen http://www.socialjava.com and http://www.brightkeep.com

[edit] fb4j

  • **NEWS** December 2, 2008: fb4j User Forums now online!!! Sign up for support for fb4j alpha and to provide your input to the coming 2.0 release!

fb4j is an API for Facebook written for Java developers, by Java developers. fb4j demystifies Facebook application development by providing a consistent, intuitive object model that allows easy access to all of the functionality of the Facebook API. fb4j is easy to use, and provides full support for authentication as well as JSON and XML interfaces. Documentation, source and binaries can be found at:

http://fb4j.sourceforge.net/

Enjoy! -Mino & Gino

[edit] JavaBook

There is a new java-based library for Facebook that uses JSON. The current version is an ALPHA, so please do expect bugs. It is, however, on Google Code so it's open source and you can help make it better. It's available at:

http://code.google.com/p/javabook/

Have fun! -- Benjamin


[edit] Facebook Java Webapp

This application aims to provide a quick and easy way for building Java Web Applications for Facebook. It aims to provide a fast-track and all-inclusive dive deep into how the Facebook Web Applications can be built. So you can take this projects as an application model then you refactor it to meet your needs:

http://code.google.com/p/facebook-java-webapp/


Cesar

Founder and Lead Developer

[edit] Facebook apps written in Java

moved to Facebook apps written in Java page


[edit] Tutorials and Example Code

Please add more :)

[edit] Advice

  • Don't forget to set the callback URL for your application.

If it is not set, the FacebookRestClient will throw an exception.

  • Use Java 5.0 or higher
  • If you are using http://apps.facebook.com/yourappname/yourpagename to create a page within FaceBook,

then you must only return an FBML fragment, and not a full HTML page.

  • FacebookRestClient.notifications_sendRequest is quite fussy about the FBML it will accept.

It normally returns a url when successful. You must then redirect the user to that url or the requests will not go through.

  • When testing your application using a local machine server (for example, Tomcat on port 8080)

Set your callbackURL to http://localhost:8080/yourappname Then open a new window in your browser, log into facebook and type in your url: http://apps.facebook.com/yourappname You can now see the page that your server normally sends back to your browser but within the facebook site frames. Make sure your server is working normally before testing it with facebook. (10/01/2009: This needs to be an address that Facebook servers can reach through the Internet, not a local network address. Therefore, http://localhost is not a valid URL.)


[edit] Bugs

Non-Java specific bugs are on the Bugs page.

reference