11

The content within the app is being updated using XHR. This involves changing the URL of the comment box:

<div class="fb-comments" data-href="http://example.com?id=[dynamic]" data-num-posts="2" data-width="470"></div>

Upon creating a new Facebook widget placeholder after the page been fully loaded, how do I request Facebook JS SDK to render new elements on the page?

1 Answer 1

20

Call the JavaScript SDK's FB.XFBML.parse(); function after you dynamically insert the fb-comments div.

See: http://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.