我在新闻网页上执行Facebook评论框。它很有效。问题在于如果我在一个页面上发表评论,它将会在所有页面上显示,这些页面都包含fb评论框。
目前我的代码是这样的:
<b><div class="fb-comments" data-href="http://selandia-ceu.dk/selandia/nyheder.aspx" data-num-posts="3" data-width="500"></div>
<script>
var fb-comments = document.getElementById( fb-comments );
mydiv.innerHTML =
<div class="fb-comments" data-href=" + document.location.href + " data-num-posts="3" data-width="500"></fb:comments> ;
FB.XFBML.parse(fb-comments);
</script></b>
网站使用 Microsoft 服务器。 代码中的 URL 应该指当前页面 1 是查看。 有人知道我应该做什么吗? : :
注释在页面上暂时禁用 。
I got the extra bit of code (FB.XFBML.parse) from this thread: Different Facebook comment box after each ajax call