我当前的查询显示从指定时间发布在墙上的一些消息。显示实际名称而不是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