Facebook comments box not showing

余生长醉 提交于 2019-12-12 04:47:24

问题


For some reason facebook comment box appears on my web articles only after I refresh the article page although it was working correctly few days ago:

The website is: http://metallica-gr.net/ , each article contains facebook comments on the bottom of the page.

Any ideas?

SOLUTION:

So I pasted the comments script right before closing instead of right after openning it like it was recommended by Facebook and now it's working again. Not sure why that happened though since it was working fine, probably it conflicts with some other script?(although I didn't add anything to my website).


回答1:


So I pasted the comments script right before closing </body> instead of right after openning it like it was recommended by Facebook and now it's working again. Not sure why that happened though since it was working fine, probably it conflicts with some other script?(although I didn't add anything to my website).




回答2:


I use jquery to show the facebook comment box:

<div id="fb-root"></div>
<script>
    $(document).ready(function () {
        (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/he_IL/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));
    });
</script>


来源:https://stackoverflow.com/questions/13055087/facebook-comments-box-not-showing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!