parsing XFBML

When loading content via ajax it can happen that Facebook social plugins do not work. When a social plugin is being loaded into the content via ajax, there is a neat javascript function that can be called to correctly parse added content:

FB.XFBML.parse(document.getElementById('div_id'));

This makes facebook elements render correctly even after an initial pageload.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.