2012-05-16 64 views
1

海蘭以及如何做,當你使用一個PAGEID,並在同一時間需要的所有評論計數的URL看起來和喜歡揹我嘗試了艱辛的道路計數的評論和喜歡的不是飼料展示和評論

$feed_profile = $facebook->api('/'.$row[0].'/feed&access_token=$access_token&limit=500',"get"); 
$post_profile = $facebook->api('/'.$row[0].'/comments?access_token=$access_token&limit=500',"get"); 

也試過評論&而不是評論?

我不知道如何找回意見和喜歡什麼,我必須準確地做我的變量$行[0]存儲各種頁面從FB

回答

0

飼料具有連接EG:評論,喜歡提供計數。


$feed_profile = $facebook->api('/'.$row[0].'/feed&access_token=$access_token&limit=5',"get"); 
// get comment/like count for first post in array. this can be done with a loop. 
    echo 'Comments: '.$feed_profile[data][0][comments][count].'<br />'; 
    echo 'Likes: '.$feed_profile[data][0][likes][count].''; 

注:你將不得不考慮錯誤處理,如果無意見或 喜歡已經建立的連接陣列不exsist

+0

飼料似乎已棄用的頁面我可以獲取數據,但對於線程ID,我無法使用api調用來取回所有未使用OAuth崩潰系統的消息 – malick