Facebook - retrieving comment-count from fb:comments using href?

半城伤御伤魂 提交于 2019-12-12 03:09:20

问题


I've integrated fb:comments using the href parameter, but I am now stuck in a situation where I need to retrieve the comment count without fb:comment-count.

I normally use an FQL query such as below...

$result = $facebook->api(array(
    'query' => 'SELECT post_id FROM comment WHERE xid = "' . $xid . '"', 
    'method' => 'fql.query'));

$comment_count = count($result);

However, there is no href column present in the comment table. Is there another way to do this? I have tried seeing if xid and href are interchangeable... no luck there. I'm also finding that fb:comments plugins created with xid id's are breaking a lot on me (see http://65beta.us/fb/fb1.php ).

Any advice would be greatly appreciated. Thanks!


回答1:


You can easily reach comment and like counts like this: http://graph.facebook.com/?ids=http://65beta.us/fb/fb1.php



来源:https://stackoverflow.com/questions/7208909/facebook-retrieving-comment-count-from-fbcomments-using-href

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!