一键 fql 查询 - facebook api
$status = $facebook->api_client->fql_query("SELECT message,time FROM
status WHERE uid in (SELECT uid2 FROM friend WHERE uid1=".$user.")");
echo "<pre>";
print_r($status);
echo "</pre>";
上面的查询返回所有状态,我只想要最后 2 条状态消息。我只能用 fql 来完成。谁能告诉我它是如何完成的?
$status = $facebook->api_client->fql_query("SELECT message,time FROM
status WHERE uid in (SELECT uid2 FROM friend WHERE uid1=".$user.")");
echo "<pre>";
print_r($status);
echo "</pre>";
above query returns all statuses, i want only last 2 status messages. I have to make it with fql only. can anyone show me how its done??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以指定 LIMIT 2 以仅返回两条记录。
根据您想要实现的目标,您可能还需要添加 ORDER BY。
You can specify LIMIT 2 to return just two records.
Depending on what you want to achieve you may need to add an ORDER BY also.