Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
    • Like Button
    • Send Button
    • Follow Button
    • Comments
    • Activity Feed
    • Recommendations Box
    • Recommendations Bar
    • Like Box
    • Login Button
    • Registration
    • Facepile
  • Facebook Login
  • Open Graph
  • Facebook APIs
  • Games
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • JavaScript
  • PHP
  • More SDKs
  • Plugins
    • Activity Feed
    • Comments
    • Facepile
    • Follow Button
    • Like Box
    • Like Button
    • Login Button
    • Recommendations Bar
    • Recommendations Box
    • Registration
    • Send Button
    • Share Dialog
    • Shared Activity
    • fb:name
    • fb:profile-pic
  • Beta Plugins
    • Migrations
      • Subscribe Button

    Recommendations Box

    The Recommendations Box shows personalized recommendations to your users. Since the content is hosted by Facebook, the plugin can display personalized recommendations whether or not the user has logged into your site. To generate the recommendations, the plugin considers all the social interactions with URLs from your site. For a logged in Facebook user, the plugin will give preference to and highlight objects her friends have interacted with.

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

    The Recommendations Box can be configured in the following ways:

    • App ID
    • One or more action types
    • Domain

    App ID
    If you specify an App ID for the Recommendations Box, we will display all actions (global and custom) specified by the associated app ID.

    <fb:recommendations 
      site="jerrycain.com"
      app_id="118280394918580">
    </fb:recommendations>
    

    One or more action types
    To specify one or more action types to display in the Recommendations Box, you can specify a comma separated list of action types. The list of action types can include both global and custom actions.

    <fb:recommendations 
      site="jerrycain.com"
      action="critiqueapp:despise,critiqueapp:review,critiqueapp:grade">
    </fb:recommendations>
    

    Domain
    By specifying a domain to show activity for, we will display all global actions for the specified domain: like, read, watch, play, listen. The domain is matched exactly, so a plugin with site=facebook.com would not include activity from developers.facebook.com or www.facebook.com. You cannot currently aggregate across multiple domains.

    <fb:recommendations 
      site="jerrycain.com">
    </fb:recommendations>
    

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

    (?)
    (?)
    (?)
    (?)
    (?)
    Header (?)
    (?)
    light
    • light
    • dark
    (?)
    _blank
    • _blank
    • _top
    • _parent
    (?)
    • arial
    • lucida grande
    • segoe ui
    • tahoma
    • trebuchet ms
    • verdana
    Get Code

    Attributes

    • site - the domain to show recommendations for. The XFBML version defaults to the current domain.
    • action - a comma separated list of actions to show recommendations for.
    • app_id - will display recommendations for all types of actions, custom and global, associated with this app_id.
    • 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'
    • linktarget - This specifies the context in which content links are opened. By default all links within the plugin will open a new window. If you want the content links to open in the same window, you can set this parameter to _top or _parent. Links to Facebook URLs will always open in a new window.
    • ref - 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.
    • max_age - a limit on recommendation and creation time of articles that are surfaced in the plugins, the default is 0 (we don’t take age into account). Otherwise the valid values are 1-180, which specifies the number of days.

    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:recommendations ref="homepage"></fb:recommendations>
    <iframe src="...&ref=homepage"></iframe>
    

    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
    
    Updated about 4 months ago
    Facebook © 2013 · English (US)
    AboutAdvertisingCareersPlatform PoliciesPrivacy Policy