我當前的查詢顯示從指定時間發佈在牆上的一些消息。顯示實際名稱而不是uid
$fql = "SELECT post_id, actor_id, target_id, message FROM " .
"stream WHERE filter_key = 'others' AND created_time > 1346277600 LIMIT 50";
問題是,它只顯示uid,而不是在牆上張貼消息的人的實際名稱。
編輯: 我現在用multiquery
$fql = "{" .
"\"user_stream\" : \"SELECT post_id, actor_id, target_id, message FROM stream WHERE " .
" filter_key = 'others' AND created_time > 1346277600 LIMIT 50 \"" .
"\"actor_info\" : \"SELECT uid, name FROM user " .
" WHERE uid IN (SELECT actor_id, target_id FROM #user_stream)\"" .
"}";
$data['msgs'] = $this->facebook->api(array(
'method' => 'fql.multiquery',
'queries' => $fql,
'access_token'=>$facebook['access_token']
));
現在我得到一個空數組,但對我的正常查詢,我得到29
$fql = "SELECT post_id, actor_id, target_id, message FROM " .
"stream WHERE filter_key = 'others' AND created_time > 1346277600 LIMIT 50"
首先在命令行檢查您的查詢。 – Nishant
是的,我知道這是行不通的。在FQL中進行一些查詢並使其顯示您想要的輸出非常困難。 – MegaNairda
嘗試facebook multiquery ... – Abhishek