Fb:random-option
From Facebook Developer Wiki
Contents |
Description
Contains code to be output when selected by the fb:random tag. You can control the frequency of this pick with the weight attribute.
The fb:random-option tag must be inside an fb:random tag.
Attributes
| Required | Name | Type | Description | |
| optional | weight | float | Allows for controlling the frequency of a choice. (Default value is 1.0.) |
|---|
Examples
<fb:random>
<fb:random-option weight="2">A: This text appears twice as often as B.</fb:random-option>
<fb:random-option weight="1">B: This text appears half as often as A.</fb:random-option>
</fb:random>
| a screenshot is not applicable for this tag |
Notes
- Weights of options are relative to the number of options left, which shrinks if
unique==trueandpick>1 in the parent fb:random tag. - Weights of options can be any float > 0. The weights are relative to each other, not necessarily to 1.
