让用户喜欢数量

时间:2012-11-18 15:26:07

标签: php sql facebook-fql

我希望得到用户朋友的总页数,如计数

当我应用下面的fql语句时,fql explorer上的结果很好。

SELECT 
  uid, 
  name, 
  likes_count 
FROM user 
WHERE uid IN (SELECT 
                uid1, 
                uid2 
              FROM friend 
              WHERE uid1=me())

nice result
但是,当我用php做同样的事情时,它并没有显示likes_counts php代码:

$fql= 'SELECT uid, name, likes_count FROM user WHERE uid IN (SELECT uid1, uid2 FROM friend WHERE uid1=me())';
$ret_obj = $facebook->api(array(
        'method' => 'fql.query',
        'query' => $fql,
        'access_token'=> ''.$fbme[access_token].''
)); 
print_r($ret_obj); 

php结果:

enter image description here

我如何展示like_counts?

1 个答案:

答案 0 :(得分:1)

最有可能的是,您在fql explorer中拥有的权限与您在PHP中设置FB会话时所请求的权限不同。