2011-01-06 61 views
0

您好我的博客上測試此代碼添加Facebook評論框,它效果很好!但是,appid可能僅被稱爲一個主題,而不是一系列的項目(即博客帖子)。不同fb:不同博客文章的評論框。怎麼樣?

結果是,我在所有博客文章中都有相同的評論!

我明白,我必須把帖子的網址的地方,但屬性url="「在<fb:comment>好好嘗試的工作。

你能幫助我嗎?

<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> 

回答

0

提供動態ID的屬性」 XID」

像後一個

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

和一個後2

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

我認爲上面的代碼是大,幾乎不能正常工作的動態每個博客帖子不同。通過實現這個代碼,每個帖子都會得到相同的fb評論框。其中所有評論都對每個帖子都可見,並且不好。

通過網絡搜索很長一段時間,我發現只有一個站點發生在前5個搜索結果中的30個站點。這是一個常見的事情,因爲這個動態改變評論框是一個很大的問題,由於跨站點腳本(博客有自己的API和fb也有自己的)。在最後一次搜索之前,我用普通的fb評論框獲得了每個搜索到的站點。

你可以從這個網站獲得解決方案。 http://pitora.blogspot.in/2013/04/add-different-fb-comment-boxs-for-each.html