FB.XFBML.parse
From Facebook Developer Wiki (FbDevWiki.com)
Parse and render XFBML markup in the document. XFBML enables you to incorporate FBML into your websites and IFrame applications.
You can parse the following XFBML tags with this method:
- fb:activity
- fb:add-profile-tab
- fb:bookmark
- fb:comments
- fb:comments-count
- fb:connect-bar
- fb:facepile
- fb:fan
- fb:friendpile
- fb:like
- fb:like-box
- fb:live-stream
- fb:login
- fb:login-button
- fb:name
- fb:profile-pic
fb:pronoun- intended to display the proper pronoun depending on the uid provided and the current user- fb:recommendations
- fb:recommendations-bar
- fb:rectangle - mentioned in live Javascript SDK, but not implemented yet
- fb:registration
- fb:send - launched April 25, 2011
fb:serverFbml- removed June 1, 2012- fb:share-button
- fb:social-bar - apparently a feature announced in March 2010 that never was completed, however it's recognized in the SDK as a valid XFBML tag and replaced with some XHTML
- fb:subscribe - creates a subscribe button so a person can subscribe to a particular person (added December 8, 2011)
fb:user-status
Examples
By default, this is all you need to make XFBML work:
FB.XFBML.parse();
Alternately, you may want to only evaluate a portion of the document. In that case, you can pass in the elment.
FB.XFBML.parse(document.getElementById('foo'));
Parameters
Name | Type | Description |
---|---|---|
dom | DOMElement | root DOM node, defaults to body |
cb | Function | invoked when elements are rendered |