FBML Versions
Problem
I know there are different versions of FBML and some tags require FBML 1.1, but how do I set or even know which version I’m using?
Solution
Wrap your FBML in fb:fbml
tags and specify a version you want them executed
with:
<fb:fbml version="1.1">
<!-- FBML Here -->
</fb:fbml>Discussion
You can include an fb:fbmlversion tag inside an fb:fbml
tag to output which version is being used to parse that content,
though you should note that this is really only intended for debugging
purposes. As an example, the following:
<fb:fbml version="1.0">
<p>This is <fb:fbmlversion /></p>
</fb:fbml>
<fb:fbml version="1.1">
<p>This is <fb:fbmlversion /></p>
</fb:fbml>
<fb:fbml version="1.2">
<p>This is <fb:fbmlversion /></p>
</fb:fbml>will give you:
This is 1.0 This is 1.1
You might have expected to get a third paragraph for 1.2, but
the FBML parser ignores it because that version didn’t exist at the
time this book was written. Using an fb:fbmlversion tag outside of an
explicit fb:fbml tag should give
you 1.0, since that’s the assumed default if you haven’t specified
otherwise.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access