开发者

Different fb:comment boxes for different blog posts. How?

开发者 https://www.devze.com 2023-02-02 17:24 出处:网络
Hi tested this code on my blog to add the facebook comment box and it works well! But pr开发者_开发技巧obabily the appid is referred to one subject only, not to a collection of items (ie blog posts).

Hi tested this code on my blog to add the facebook comment box and it works well! But pr开发者_开发技巧obabily the appid is referred to one subject only, not to a collection of items (ie blog posts).

The result is that I've the same comments in all the blog posts!

I understand that I have to put the post url somewhere but the attribute url="" in <fb:comment> doens't work.

Can you help me?

<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '184659544895383', status: true, cookie: true,
xfbml: true});
};

</script>
<script src="http://connect.facebook.net/en_US/all.js#appId=184659544895383&amp;amp;xfbml=1"></script>
<fb:comments publish_feed="true" width="490" numposts="10" xid="18465954489538"></fb:comments>


Provide a dynamic ID to attribute "xid"

Like on post one

<fb:comments publish_feed="true" width="490" numposts="10" xid="post1"></fb:comments>

and one post 2

<fb:comments publish_feed="true" width="490" numposts="10" xid="post2"></fb:comments>


I think the above code is to big and almost not working properly as dynamically different for each blog post. By implementing this code one get same fb comment box for each post. In which all comments are visible for every post and that is not good.

By searching over the net for a long time I found only one site from something 30 sites taking place in top 5 search results. It's an usual thing because this trick to change comment box dynamically is a big problem to get rid due to cross site scripting (blogger has its own API and fb also has its own). Before last one search i got every searched site with normal fb comment box.

you can get the solution from this site. http://pitora.blogspot.in/2013/04/add-different-fb-comment-boxs-for-each.html

0

精彩评论

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

关注公众号