How to use Facebook share the FBML button on a page loaded via Ajax?


I have a chunk of content that I load via Ajax, and on that page I have a FBML share button. I also tried it without the FBML and just used the hyperlink and script tag. When I load the content directly, the share button loads fine, but when I load it via Ajax, the button doesn't show up. Any ideas on how to get the Facebook Share button working?

I believe you need to invoke FB.XFBML.Host.parseDomTree() after your content has been inserted. This will cause the Facebook JS libraries to scan for XFBML tags and render them.