开发者

FB Comment Box not working

开发者 https://www.devze.com 2023-04-06 09:50 出处:网络
I am using FB Commentbox on my blog on bloggers, but it never displays. I am using this code <b:if cond=\'data:blog.pageType == &quot;item&quot;\'>

I am using FB Commentbox on my blog on bloggers, but it never displays. I am using this code

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<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="googleplusblog.info" data-num-posts="10" data-width="500"></div>
</b:if>

And this in Head

<meta property="fb:app_id" content="XXXXXXXXXX98504"/>
<meta property="fb:admins" content="XXXXXXXXXX31342"/>

APP ID is the id which was generated when i created the app (i just cr开发者_运维问答eated the app for ID, hadn't done any editing to its default settings)

Please tell me what i am doing wrong


You've probably discoved the answer by now, but for anyone else coming across this, you need to add the fb namespace to the page like this:

<html xmlns:fb="http://ogp.me/ns/fb#">
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号