SEO

March 27, 2011

Activity Feed - Facebook Developers

The Activity Feed plugin displays the most interesting recent activity taking place on your site. Since the content is hosted by Facebook, the plugin can display personalized content whether or not the user has logged into your site. The activity feed displays stories both when users like content on your site and when users share content from your site back to Facebook. If a user is logged into Facebook, the plugin will be personalized to highlight content from their friends. If the user is logged out, the activity feed will show recommendations from your site, and give the user the option to log in to Facebook.

The plugin is filled with activity from the user's friends. If there isn't enough friend activity to fill the plugin, it is backfilled with recommendations. If you set the recommendations param to true, the plugin is split in half, showing friends activity in the top half, and recommendations in the bottom half. If there is not enough friends activity to fill half of the plugin, it will include more recommendations.

You specify a domain to show activity for. The domain is matched exactly, so a plugin with site=facebook.com would not include activity from developers.facebook.com. You cannot currently aggregate across multiple domains.

The plugin is available either via a simple iframe you can drop into your page, or if you are using the new JavaScript SDK, you can use the <fb:activity> XFBML tag.

Attributes

  • site - the domain to show activity for. The XFBML version defaults to the current domain.
  • width - the width of the plugin in pixels. Default width: 300px.
  • height - the height of the plugin in pixels. Default height: 300px.
  • header - specifies whether to show the Facebook header.
  • colorscheme - the color scheme for the plugin. Options: 'light', 'dark'
  • font - the font to display in the plugin. Options: 'arial', 'lucida grande', 'segoe ui', 'tahoma', 'trebuchet ms', 'verdana'
  • border_color - the border color of the plugin.
  • recommendations - specifies whether to always show recommendations in the plugin. If recommendations is set to true, the plugin will display recommendations in the bottom half.
  • filter - allows you to filter which URLs are shown in the plugin. The plugin will only include URLs which contain the filter in the first two path parameters of the URL. If nothing in the first two path parameters of the URL matches the filter, the URL will not be included.
  • ref - a label for tracking referrals; must be less than 50 characters and can contain alphanumeric characters and some punctuation (currently +/=-.:_). Specifying the ref attribute will add the 'fb_ref' parameter to the referrer URL when a user clicks a link from the plugin.

What is the best way to know which plugin on my site generated the traffic?

Add the 'ref' parameter to the plugin (see "Attributes" above).

Examples:

<fb:activity ref="homepage"></fb:activity>

When a user clicks a link on the plugin, we will pass back the ref value as a fb_ref parameter in the referrer URL. Example:

http://www.facebook.com/l.php?fb_ref=homepage

Discussion

Updated about 2 weeks ago