Facebook - retrieving comment-count from fb:commen

2019-08-26 01:33发布

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条回答
啃猪蹄的小仙女
2楼-- · 2019-08-26 01:37

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

查看更多
登录 后发表回答