2014-03-02 102 views
-1

嗨,大家好,我使用Facebook的評論API爲我的網站如何讓我的網站Facebook評論在一個地方?

在這每一個網址,Facebook Comment線程處於活動

喜歡ID = 2,ID = 3

WWW .mysite.com/page2.php?id = 2對此5評論來吧

www.mysite.com/page3.php?id=3這個15這番表態

現在我想在頁面上顯示總20評論www.mysite.com/all_comments

我將如何做到這一點。

任何幫助表示感謝。

+0

爲什麼downvote downvoter? –

回答

-1
This is possible only if you have your post id for which you want to get comments on that particular posts 

//Select total no of comments on this post from facebook 
    $fquery = "SELECT comment_info FROM stream WHERE post_id ='".$idd."'"; 
    $fparam = array('method' => 'fql.query', 'query' => $fquery); 
    $fql = $facebook->api($fparam); 
    $cmcount = $fql['0']['comment_info']['comment_count']; 


    /fetch comments,time,id from facebook on current post 
     $fquery2 = "SELECT fromid, time,text , id FROM comment WHERE post_id='".$idd."' LIMIT $ofset,$cmcount "; 
     $fparam2 = array('method' => 'fql.query', 'query' => $fquery2); 
     $fql2 = $facebook->api($fparam2); 
+0

我得到根據職位ID,但我想得到所有發表評論在一個宮殿,但謝謝你給你的時間 –

相關問題