Facebook Widgets

Likebox

  • Minimal code:

    {% social_widget_render "facebook/likebox.html" href="https://www.facebook.com/FacebookDevelopers" %}
    
  • Full code:

    {% social_widget_render "facebook/likebox.html" locale="en_US" app_id=12345678 href="https://www.facebook.com/FacebookDevelopers" height=300 colorscheme="light" force_wall=False header=True show_border=True show_faces=True stream=False width=300 %}
    

Parameters

Parameter Description Default
locale Used to determine the language of the widget. Django locale (en_US by default)
app_id Facebook Application ID. None
colorscheme The color scheme used by the plugin. Can be “light” or “dark”. “light”
force_wall For “place” Pages (Pages that have a physical location that can be used with check-ins), this specifies whether the stream contains posts by the Page or just check-ins from friends. False
header Specifies whether to display the Facebook header at the top of the plugin. True
height The height of the plugin in pixels. The default height varies based on number of faces to display, and whether the stream is displayed. With stream set to True and 10 photos displayed (via show_faces) the default height is 556px. With stream and show_faces both False, the default height is 63px. Varies, see left.
href The absolute URL of the Facebook Page that will be liked. This is a required setting. None
show_border Specifies whether or not to show a border around the plugin. True
show_faces Specifies whether to display profile photos of people who like the page. True
stream Specifies whether to display a stream of the latest posts by the Page. False
width The width of the plugin in pixels. Minimum is 292. 300

Follow Button

Parameters

Parameter Description Default
locale Used to determine the language of the widget. Django locale (en_US by default)
app_id Facebook Application ID. None
colorscheme The color scheme used by the plugin. Can be “light” or “dark”. “light”
href The Facebook.com profile URL of the user to follow. None
kid_directed_site If your web site or online service, or a portion of your service, is directed to children under 13 you must enable this “False”
layout Selects one of the different layouts that are available for the plugin. Can be one of “standard”, “button_count”, or “box_count”. See the FAQ for more details. “standard”
show_faces Specifies whether to display profile photos below the button (standard layout only). You must not enable this on child-directed sites . “False”
width The width of the plugin. The layout you choose affects the minimum and default widths you can use, please see the FAQ for more details. Depends on layout

Embedded Post

  • Minimal code:

    {% social_widget_render "facebook/embedded_post.html" href="https://www.facebook.com/FacebookDevelopers/posts/10151471074398553" %}
    
  • Full code:

    {% social_widget_render "facebook/embedded_post.html" locale="en_US" app_id=12345678 href="https://www.facebook.com/FacebookDevelopers/posts/10151471074398553" width=500 %}
    

Parameters

Parameter Description Default
locale Used to determine the language of the widget. Django locale (en_US by default)
app_id Facebook Application ID. None
href The absolute URL of the Post that will be embedded. None
width The pixel width of the post (between 350 and 750) 500

Activity Feed

  • Minimal code:

    {% social_widget_render "facebook/activity_feed.html" site="developers.facebook.com" %}
    
  • Full code:

    {% social_widget_render "facebook/activity_feed.html" locale="en_US" app_id=12345678 site="developers.facebook.com" action="likes, recommends" colorscheme="light" header=True height=300 linktarget="_blank" max_age=0 recommendations=False width=300 %}
    

Parameters

Parameter Description Default
locale Used to determine the language of the widget. Django locale (en_US by default)
app_id Facebook Application ID. None
action A comma-separated list of Open Graph action types to show in the feed. Any action type
app_id Display all actions associated with this app ID. This is usually inferred from the app ID you use to initiate the [JavaScript SDK]. None
colorscheme The color scheme used by the plugin. Can be “light” or “dark”. “light”
filter Allows you to filter which URLs are shown in the plugin. For example, if the site parameter is set to ‘www.example.com’ and the filterparameter was set to ‘/section1/section2’ then only pages which matched ‘http://www.example.com/section1/section2/*‘ would be included in the activity feed section of this plugin. This filter does not apply to any recommendations which may appear in this plugin (see recommendations setting). None
header Show the “Recent Activity” header above the feed. Can be “True” or “False” “True”
height The height of the plugin in pixels. 300
linktarget Determines what happens when people click on the links in the feed. Can be any of the standard HTML target values . “_blank”
max_age Limit the created time of articles that are shown in the feed. Valid values are 1-180, which represents the age in days to limit to. 0 (no limit)
recommendations Specifies whether to always show recommendations (Articles liked by a high amount of people) in the bottom half of the feed. Can be “True” or “False”. “False”
ref A label for tracking referrals which must be less than 50 characters and can contain alphanumeric characters and some punctuation (currently +/=-.:_). See the FAQ for more details. None
site The domain for which to show activity. Current domain
width The width of the plugin in pixels. 300

Recommendations Feed

  • Minimal code:

    {% social_widget_render "facebook/recommendations_feed.html" site="developers.facebook.com" %}
    
  • Full code:

    {% social_widget_render "facebook/recommendations_feed.html" locale="en_US" app_id=12345678 site="developers.facebook.com" ref="page_ref" action="likes, recommends" colorscheme="light" header=True height=300 linktarget="_blank" max_age=0 width=300 %}
    

Parameters

Parameter Description Default
locale Used for widget localization Django locale (en_US by default)
app_id Facebook Application ID. None
action A comma-separated list of Open Graph action types to show in the feed. Any action type
app_id Display all actions associated with this app ID. This is usually inferred from the app ID you use to initiate the [JavaScript SDK]. None
colorscheme The color scheme used by the plugin. Can be “light” or “dark”. “light”
header Show the “Recent Activity” header above the feed. Can be “True” or “False” “True”
height The height of the plugin in pixels. 300
linktarget Determines what happens when people click on the links in the feed. Can be any of the standard HTML target values . “_blank”
max_age Limit the created time of articles that are shown in the feed. Valid values are 1-180, which represents the age in days to limit to. 0 (no limit)
ref A label for tracking referrals which must be less than 50 characters and can contain alphanumeric characters and some punctuation (currently +/=-.:_). See the FAQ for more details. None
site The domain for which to show activity. Current domain
width The width of the plugin in pixels. 300

Share Button

  • Minimal code:

    {% social_widget_render "facebook/share_button.html" href="developers.facebook.com" %}
    
  • Full code:

    {% social_widget_render "facebook/share_button.html" locale="en_US" app_id=12345678 href="developers.facebook.com" layout="none" %}
    

Parameters

Parameter Description Default
locale Used for widget localization Django locale (en_US by default)
app_id Facebook Application ID. None
href The absolute URL of the Post that will be embedded. None
layout Share button layout type None