Facebook /me/home FQL 等效项

发布于 2024-12-14 08:42:31 字数 518 浏览 0 评论 0原文

为了获得我想要的应用程序功能,我需要开始使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

守望孤独 2024-12-21 08:42:31

这个查询应该做到这一点 -

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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文