Fb:random-option
From Facebook Developers Wiki
Contents |
[edit] 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.
[edit] Attributes
| Required | Name | Type | Description | |
| optional | weight | float | Allows for controlling the frequency of a choice. (default value is 1.0) |
|---|
[edit] 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 |
[edit] 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.
