Recommendations Bar
The Recommendations bar lets people 'like' content, get recommendations, and share what they're reading with their friends.
Settings
The configurator above doesn't include all of the possible settings for your plugin. You can also change the following settings:
Setting | HTML5 Attribute | Description | Default |
---|---|---|---|
action | data-action | The verb to display on the button. Can be either "like" or "recommend" | like |
href | data-href | The absolute URL of the page that will be liked. | XFBML and HTML5 versions default to the current URL. |
max_age | data-max-age | A limit on recommendation and creation time of articles that are surfaced in the plugins. Valid values are 1-180, which specifies the age in days. | (no limit) |
num_recommendations | data-num-recommendations | The number of recommendations to display. The maximum value is 5. | 2 |
read_time | The number of seconds before the plugin will expand. Minimum is 10. | 30 | |
ref | data-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 |
side | data-side | The side of the screen where the plugin will be displayed. This will automatically adjust based on the language, or can be set explicitly. Options are "left" or "right" | Determined by language |
site | data-site | A comma separated list of domains to show recommendations for. | The domain of the href value |
trigger | data-trigger | Determines when the plugin expands to show recommendations. See the FAQfor full details on each option. | onvisible |
FAQ
How can I customize what is shared when people click on the Like button on the bar?
The story created by the action of liking your page can be enriched by using meta tags to turn a simple HTML page into an Open Graph object. If you plan to use the Like button on any page on your website, you should read our best practices guide to ensure published stories look great on Facebook and get the best possible distribution.
What do the different trigger
settings do?
The plugin is expanded once the
trigger
parameter requirements are met, and the person has been on the page for at least the duration specified in the read_time
parameter. There are three values for the trigger
parameter:onvisible
:
The plugin is expanded when people scroll past the exact point where the<fb:recommendations-bar />
tag is placed on the page. This is the simplest option and will work best if you place the tag right at the end of your article's main content. This is the default.X%
, where X is any positive integer less than or equal to 100:
This specifies the percent of the page that must be scrolled before the plugin is expanded. For example: A value of100%
would indicate that people need to scroll all the way to the end of the page before the plugin expands. A value of50%
indicates that people need to scroll to the middle point of the page.manual
:
Use this option to manually trigger the plugin. When you want to trigger the plugin, callFB.XFBML.RecommendationsBar.markRead(href)
in JavaScript. Thehref
parameter is optional and will default to the current page if not set. If provided, it must match thehref
parameter on the XFBML tag. The manual trigger is useful when you have more a multipage article. For example on a three-page article, you would addtrigger="manual"
on pages one and two and never call themarkRead
JavaScript function on those pages.
No comments:
Post a Comment