Facebook Portlet (Connect API)

Facebook Portlet (Connect API)

This is a new, simplified version of the Facebook portlet that does not perform any server-side communication or storage of preferences. All calls to Facebook are done through the new Connect API, which is a client-side JavaScript API library.

Download, configure and install

FIRST: Create an application through http://developers.facebook.com just like any other application. If you already have one from an old Facebook portlet, you can use it. During your setup, specify the "Callback URL" as the path to http://your-portal-url/FacebookPortlet/. Once you're setup you get an API key from Facebook. Save this key for later.

  1. Download the source code here: facebookPortlet-0.2.zip
  2. Unzip the archive.
  3. Open the file: facebookPortlet/src/main/resources/configuration.properties. Change the apiKey property to the key you got from Facebook when you created your application. Save and close
  4. In the facebookPortlet directory, run mvn clean install.
  5. Deploy FacebookPortlet.war using your portal's deployment system (for uPortal: in the uPortal source directory, run ant deployPortletApp -DportletApp=/path/to/FacebookPortlet.war).
  6. Configure the portlet in uPortal as portlet path /FacebookPortlet and portlet name FacebookPortlet.

Screenshots


Before the user is connected:
 
 
 
 

When the user hits the Connect button, they'll get a simple dialog window asking them if they want to link their accounts. The window varies in appearance depending on if the user is already logged into Facebook in the user's browser or not.


 


Once they connect, the user sees a summary of Facebook activity and is given the option to allow the portlet to support status updates. 



Facebook requires the API client to verify that the user really wants to be updating their status from the portlet, so another dialog pops up.



Once the user allows the portlet to send status updates, we can now fill out our status through the portlet.

Â