Fb:activity

From Facebook Developer Wiki (FbDevWiki.com)
Jump to: navigation, search

Example:

<fb:activity></fb:activity>

renders the following:

Attributes/Settings

Name Type Description Default
site url the domain to show activity for [ the current domain/url ]
width integer the width of the plugin in pixels 300
height integer the height of the plugin in pixels 300
header boolean specifies whether to show the title bar header that says "Recent Activity" true
colorscheme [ 'light', 'dark' ] the color scheme for the plugin light
font [ 'arial', 'lucida grande', 'segoe ui', 'tahoma', 'trebuchet ms', 'verdana' ] the font to use same as Facebook
border_color  ?? border color of the plugin
recommendations boolean 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 a full path allows you to filter which URLs are shown in the plugin. The plugin will only include URLs which contain the filter string 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. For example, if the 'site' parameter is set to 'www.example.com' and the 'filter' parameter was set to '/section1/section2' then only pages which matched '<code>http://www.example.com/section1/section2/*</code>' would be included in the activity feed section of this plugin. The filter parameter does not apply to any recommendations which may appear in this plugin (see above); Recommendations are based only on 'site' parameter. no filter
ref string a label for tracking referrals; must be less than 50 characters and can contain alphanumeric characters and some punctuation (currently +/=-.:_). Specifying a value for the ref attribute adds the 'fb_ref' parameter to the any links back to your site which are clicked from within the plugin. Using different values for the ref parameter for different positions and configurations of this plugin within your pages allows you to track which instances are performing the best. no ref value

Non-SDK method

It's also possible to include the plugin on a page without having to load the Javascript SDK and parse XFBML (which is likely much faster). You can include an iframe that loads http://www.facebook.com/plugins/activity.php and you can include the same parameters as above but as GET variables. Because of browser security, it's likely that you need to include the site parameter for the page to render the correct data.

iframe example:

<iframe src="http://www.facebook.com/plugins/activity.php?site=fbdevwiki.com&amp;width=300&amp;height=300"
 scrolling="no" frameborder="0" 
 style="border:none; overflow:hidden; width:300px; height:300px;" 
 allowTransparency="true">
</iframe>
Personal tools
Namespaces
Variants
Actions
Navigation
Graph API
FQL
Toolbox