I'm trying to make the Facebook Comment Social Plugin here to work with my Ajax jQuery call under WordPress but unsucessfully.
I am calling a page via jQuery load() after I click on a link. This brings me all the content from that page. I've tried the following already:
Adding the code below in the loaded page or in the original page (the one that calls):
<div class="fb-comments" data-href="<?php echo $commentsFB; ?>" data-num-posts="5" data-width="500"></div>
If I add it in the original page, the comment box shows but I don't want it to show right away, I only want it to show when the user clicks on a link! What can I do to make it work? I tried to hide the box via jQuery with (field).hide() but it doesn't work, it shows either way.
If you want an example http://dev.bsides.co/wasabi/gol/goleiros/ (click on the blue names)
Best Answer
Use
FB.XFBML.parse();
after ajax call to regenerate comment box.it is already posted here
Different Facebook comment box after each ajax call