开发者

How to get facebook total likes for a facebook application?

I know you can get the total fan count for a facebook page via the facebook graph api. But I cannot seem to be able to get the total likes (or fan count) of a facebook application. Take for example, graph.facebook.com/castleage, notice that the fan count is missing...any clues on how to do so? T开发者_StackOverflow中文版hanks.


Try luck with something like this:

$data = array();

try {
    $data = $facebook->api(array(
        'query' => 'SELECT uid FROM page_fan WHERE page_id=' . $fanpageId,
        'method' => 'fql.query'
    ));
} catch(Exception $e) {
    print_r($e);
}

$fanCount = count($data);    

print_r($fanCount);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜