0

I have a dynamic webpage where the user can hit a button that will allow them to view images/video dynamically. Each url/video has its own ID number which is displayed in the URL. I am trying to add a dynamic facebook comment box below each image/video. Each Image/video should have its own dynamic facebook comment box.

    <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_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-comments" data-href="www.testsite.com/testpage" data-width="470" data-num-posts="10"></div>
4

1 回答 1

3

将它放在<DIV>您需要的任何地方 - 只需更改data-href值。

于 2013-06-27T19:16:45.977 回答