2012-11-18 80 views
2

我想獲得用戶的朋友的頁面總像數獲取用戶喜歡伯爵

當我申請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

很可能,您在fql explorer中的權限與在PHP中設置FB會話時請求的權限不同。

+0

我們該如何從圖形API做到這一點? –