Full View >>

jquery.ui.facebook.rss

Facebook RSS jQuery Plugin

Note: Facebook just changed their feed API, this plugin (currently broken) will need to be updated to make use of the auth_token to work.

The Facebook RSS jQuery plugin makes it easy to retrieve RSS information from Facebook and display it on a page using all client side code.  The plugin makes a request to Facebook by way of JSONP, by default applies a template to the retrieved content, then injects the content into the context element.

Download The Plugin

Download Plugin Version 1.0

Getting Started

  1. Make sure you have jQuery installed and working.
  2. Download the plugin and place it in your scripts directory.
  3. Include the plugin script and start using it.
  4. See examples below.
<script language="javascript" type="text/javascript" src="script/jquery.ui.facebook.rss.js"></script>

Examples

Example 1

Populate an element with 5 of a user’s status updates.

<div id="myUserStatus" />
$(function(){
    $("#myUserStatus").facebookRss({username: "godliikemouse", limit: 5});
});

Example 2

Populate all elements of a specific class with the user’s status updates by tag parameters.

<div class="userStatus" facebook-username="godliikemouse" facebook-limit="5" />
$(function(){
    $(".userStatus").facebookRss();
});

API Options

Option Attribute Equivalent Description
username facebook-username (Required) The Facebook username from which to pull the status updates.
template facebook-template The template string which will be used to transform each entity. Default is $.fn.facebookRss.defaultTemplate.
context n/a – uses current $this The content target or content element to be populated. Default is null.
offset facebook-offset The zero based starting offset to be used when retrieving status updates. Default is 0.
limit facebook-limit The maximum count or limit of status updates to retrieve. Default is 25.
url facebook-url The url used to retrieve status updates. Default is https://graph.facebook.com/ + options.username + /feed.
callback n/a The callback function to be use as an override when retrieving status updates. Default is null, internal template engine is used.
Full View >>

Leave a Reply