Facebook 评论插件未加载

发布于 2025-01-02 18:20:53 字数 257 浏览 3 评论 0原文

我在我的一个页面(WordPress 驱动)上使用 Facebook 评论插件,它正在工作,但突然停止加载。我没有更改任何内容,我可以在页面上看到这些代码。这种情况发生过好几次,有时工作突然停止。我在 html 标签处添加了 xml 名称空间,并将代码放在 body 开始标签之后,首先是根 div,然后是 js。任何人都可以在 http://heera.it/who 查看它,它位于页面底部。谢谢 !

I'm using Facebook comments Plugin on one of my page (WordPress Driven) and it was working but suddenly it stopped loading. I didn't change anything and I can see those codes present at the page. It happened several times, sometimes work and suddenly stops. I've added xml name space at the html tag and placed the code right after body opening tag, at first the root div and then js. Can anyone please check it out at http://heera.it/who and it's at the bottom of the page. Thanks !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吃兔兔 2025-01-09 18:20:53

尝试不使用插件。自己做吧。

找到这一行: 在文件中(在主题中)您想要添加评论 facebook。 (exm.wp-content ->主题 ->YourTheme ->single.php)

将以下代码复制并粘贴到上面的行上方:

    <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="YOUR WEBSITE LINK" data-num-posts="2" data-width="628"></div>
<?php comments_template(); ?>

Try without using a plugin. Just make your own.

Find this line: <?php comments_template(); ?> in the file (in theme) you want to add a comment facebook. (exm. wp-content -> themes -> YourTheme -> single.php)

Copy and paste the following code above the line above:

    <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="YOUR WEBSITE LINK" data-num-posts="2" data-width="628"></div>
<?php comments_template(); ?>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文