Fb:fan
From Facebook Developer Wiki
Contents |
Description
Renders a Fan Box on a website. The Fan Box is a Facebook Connect social widget that allows Facebook Page owners to attract and gain Facebook fans from their own website.
This tag is an XFBML tag and can be used on external websites only. If you want to render a Fan Box on an FBML canvas page, use fb:iframe and reference the Fan Box as per the instructions on the Fan Box page.
You can modify the Fan Box's colors and fonts, but you cannot delete, obscure or modify:
- Your Page title and icon
- The Become a Fan button
- The order of the elements (button, stream, fans)
Attributes
| Required | Name | Type | Description | |
| required | profile_id | int | The ID of the Page associated with the Fan Box (it's the numeric ID in the Page URL if a username wasn't specified for the Page). Specify either the profile_id or the name, but not both. | |
|---|---|---|---|---|
| name | string | The Page's name (the name after http://www.facebook.com/pages/ in the URL) or username (if one was specified). Specify either the profile_id or the name, but not both. | ||
| optional | stream | bool | Set to 1 to display stream stories in the Fan Box or 0 to hide stream stories. (Default value is 1.) | |
| connections | int | The number of fans to display in the Fan Box. Specifying 0 hides the list of fans in the Fan Box. You cannot display more than 100 fans. (Default value is 10 connections.) | ||
| width | int | The width of the Fan Box in pixels. The Fan Box must be at least 200 pixels wide at minimum. (Default value is 300 pixels.) | ||
| height | int | The height of the Fan Box in pixels. The height defaults based on the elements you include in the Fan Box. For a Fan Box that contains only the Become a Fan button, but no stream or friends, the height is 64 pixels. If you include all the features, the Fan Box is 554 pixels high. | ||
| css | string | The URL to your own stylesheet. Note: To provide you with better performance, we cache your stylesheet. If you update your stylesheet, you should use a cachebreaker in the URL to the stylesheet, typically by appending a version number to the .CSS file extension, as in http://www.example.com/my.css?2. |
Examples
<fb:fan name="platform" stream="1" connections="8" width="250"></fb:fan>
See Also
- Known issues with the Fan Box.
