Facebook /me/home FQL 等效项
为了获得我想要的应用程序功能,我需要开始使用 FQL。
对于我使用的主流:-
$fb_news_feed = $facebook->api('/me/home');
返回相同 JSON 的 FQL 中的等效项是什么。我当前的 FQL 如下,
$fb_feed_params = array(
'method' => 'fql.query',
'query' => "SELECT post_id, actor_id, target_id, message, likes, created_time, type FROM stream WHERE filter_key = 'nf' AND is_hidden = 0 LIMIT 100",
);
$fb_news_feed = $facebook->api($fb_feed_params);
如何获取用户名等?我猜我必须像在 mysql 中那样进行某种连接?
to get the functionality of I want for my app I need to start using FQL.
For the main stream I was using:-
$fb_news_feed = $facebook->api('/me/home');
what would be the equivelent in FQL that returns the same JSON. My current FQL is below
$fb_feed_params = array(
'method' => 'fql.query',
'query' => "SELECT post_id, actor_id, target_id, message, likes, created_time, type FROM stream WHERE filter_key = 'nf' AND is_hidden = 0 LIMIT 100",
);
$fb_news_feed = $facebook->api($fb_feed_params);
how do I get the users name etc? I'm guessing I would have to do some kind of join like you would in mysql??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个查询应该做到这一点 -
SELECT name, username, pic from user WHERE uid IN (SELECT actor_id FROM stream WHERE filter_key = 'nf' AND is_hidden = 0 LIMIT 100)
或者,您可以考虑执行多重查询。有关多重查询的更多信息,请访问 Facebook 开发人员网站:
https://developers .facebook.com/docs/reference/rest/fql.multiquery/
This query should do it -
SELECT name, username, pic from user WHERE uid IN (SELECT actor_id FROM stream WHERE filter_key = 'nf' AND is_hidden = 0 LIMIT 100)
Alternatively you could look at doing a multiquery. More information on multiqueries can be found on the facebook developers site:
https://developers.facebook.com/docs/reference/rest/fql.multiquery/