July 2008
Beginner
192 pages
4h 41m
English
<fb:random/>
<fb:random>...<fb:random-option>...</fb:random-option></fb:random>
Allows you to specify a set of individual pieces of content. Facebook will then randomly pick—based on the weight you specify—one or more of the options you chose. <fb:random/> is especially useful in user profiles, where data cannot be explicitly dynamic.
None.
pick=[int] default:
1Specifies the number of <fb:random-option/>s to return.
unique=[true|false] default:
trueIf pick is greater than 1,
specifies whether to enforce the returned values to be
unique.
Here is example FBML code for
<fb:random/>:
<fb:random> <fb:random-option> randomly selected text 1
</fb:random-option> <fb:random-option> randomly selected
text 2 </fb:random-option>
</fb:random>The HTML for the example just shown renders randomly. It will either look like this:
randomly selected text 1
Or like this:
randomly selected text 2 will be displayed.
Read now
Unlock full access