I'd like to add a Facebook send button (which is not yet supported with iframes) dynamically to the page after it loads (due to the way the site is constructed, it will be part of an HTML template loaded through AJAX on a user action).
Though I'm importing the FB JavaScript SDK, when I load the new content through AJAX, the marked element is not "transformed" into the FB send button.
I've tried:
<div class="fb-send" data-href="example.com"></div>
and
<fb:send href="example.com"></fb:send>
Any suggestions?
Whenever you add an FBML element to the dom you should call
FB.XFBML.parse();
http://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With