线程选项Facebook评论插件不适用于Chrome

时间:2011-12-11 00:35:22

标签: facebook google-chrome comments

如何让Facebook Comments插件在Google Chrome上运行?它出现在IE9和Opera中,但由于某些原因无法在Google Chrome上访问。

提前致谢!

使用的代码(来自Facebook开发者评论):

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

<div class="fb-comments" data-href="http://websiteurl....." data-num-posts="1" data-width="500"></div>

1 个答案:

答案 0 :(得分:0)

您是否在html标头中添加了facebook xmlns属性?我在这个插件的网页上遇到了一些问题,直到我添加它。

<html lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">

此外,我在评论'div中使用没有“数据”的属性,它适用于所有浏览器:

<fb:comments href="WEB_URL" num_posts="10" width="500" notify="true"></fb:comments>
相关问题