One of my previous post discussed about OAuth based authentication for Twitter, LinkedIn and Yahoo. Here I'll discuss about authentication and usage of Facebook. It also provides OAuth based authentication, but the flow and usage is slightly different. Please refer to Desktop Application Authentication for more information.

Please ensure that you register your application with Facebook. Specify Connect URL as based URL of deployed applet. Note down Application ID which will be used as client_id. Using client_id and Applet URL we can create the authorization URL as shown below.



Authentication Steps:
  • Click on above link and login to Facebook
  • Authorize JavaFX Sample application to access your Facebook profile
  • Page will be automatically redirected to the JavaFX Applet page
  • Extract the access_token parameter from URL
  • Pass access_token to JavaFX Applet as argument
  • Use Facebook Graph API to access all rest of information


Please refer to JavaFXFacebook.html for more information related to extraction and passing of access_token to JavaFX Applet. The view is implemented using ListView. Please refer to New to JavaFX 1.3: Cells for usage on ListView + ListCell APIs.

Try it out and let me know feedback





Read More about [JavaFX + Facebook...