in my website front page few thumbnail are there when we click on those thumbnail it shows the gallery just like facebook i am trying to implement facebook comment on that when i click on any of the thumnail first time facebook comment box will be shown and when i click on next photo of that gallery facebook comment will not be shown however my gallery each photos has one absolute url and i am defining that url in facebook comment code.here is my code.
my url is way2enjoy.com you can click on any photo there and see that for first photo comment will appear.
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=114744998704777";
fjs.parentNode.insertBefore(js, fjs);
}(document, \'script\', \'facebook-jssdk\'));</script>
<div class="fb-comments" data-width="340" data- href="http://way2enjoy.com/photos/view/'.$id.'" data-num-posts="10" data- colorscheme="light"></div>
The comments plugin is not being rendered on load (it's added after), you need to run FB.XFBML.parse()
after adding.