2012-11-27 189 views
0

我收到以下FQL查詢FQL返回空值

$fql="SELECT uid, page_id from page_fan where uid=me()"; 
$user_frnd = $facebook->api("/fql?q = " . urlencode($fql)); 

請告訴我問題NULL結果呢?

+0

你有user_likes權限?你有沒有試過通過https://developers.facebook.com/tools/explorer運行它? – TommyBs

+0

是的。該查詢在瀏覽器上正常工作,我也擁有所有的權限 –

回答

0

嘗試使用:

$params = array(
'method' => 'fql.query', 
'query' => "SELECT uid, page_id from page_fan where uid=me()", 
); 

//Run Query 
$JSON = $facebook->api($params); 
+0

http://stackoverflow.com/questions/13581179/dataexception-101-invalid-api-key –