| FBML has been deprecated. Starting June 1, 2012 FBML apps will no longer work as all FBML endpoints will be removed. If you are building a new application on Facebook.com, please implement your application using HTML, JavaScript and CSS. You can use our JavaScript SDK and Social Plugins to embedded many of the same social features available in FBML. |
Randomly chooses an item inside the tags based on the weights provided.
fb:random allows the developer to input a series of tags, of which one or more are shown randomly. Each item can have a weight and the tag can be specified to show more than one choice. Each option should be wrapped in an fb:random-option tag.
| Name | Type | Description |
|---|---|---|
| pick | int | The number of items to choose from the random subset. Default value is |
| unique | bool | Indicates whether to force uniqueness if |
<fb:random> <fb:random-option weight="2">A: This will be shown 2 times as often as B.</fb:random-option> <fb:random-option weight="1">B: This will be show half as often as A</fb:random-option> </fb:random>