Facebook FQL 从应用程序获取所有状态消息

发布于 2024-09-10 21:20:00 字数 608 浏览 5 评论 0原文

我正在尝试获取 Facebook for Android 应用程序发布的所有好友消息的列表。 Android 版 Facebook 应用程序的 app_id=350685531728。

这将返回所有好友用户 ID:

SELECT uid2 FROM friend WHERE uid1 = $facebook_user_id

这将返回某个用户 ID 的所有 Android 版 Facebook 帖子:

SELECT message, app_id FROM stream WHERE app_id = 350685531728 AND source_id IN ($facebook_user_id)

但这将返回一个空集:

SELECT message, app_id FROM stream WHERE app_id = 350685531728 AND source_id IN (SELECT uid2 FROM friend WHERE uid1 = $facebook_user_id)

有人能告诉我如何修复我的查询以使其正常工作吗?

I am attempting to get a list of all friend messages posted by the Facebook for Android application. The Facebook for Android application has app_id=350685531728.

This returns all friend user ids:

SELECT uid2 FROM friend WHERE uid1 = $facebook_user_id

This returns all Facebook for Android postings for a user id:

SELECT message, app_id FROM stream WHERE app_id = 350685531728 AND source_id IN ($facebook_user_id)

But this returns an empty set:

SELECT message, app_id FROM stream WHERE app_id = 350685531728 AND source_id IN (SELECT uid2 FROM friend WHERE uid1 = $facebook_user_id)

Can someone tell me how to fix my query so that it works?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

却一份温柔 2024-09-17 21:20:00

我对此做了很多测试。据我所知,在查询某些表时,FQL 存在一些奇怪之处。在我的状态查询中添加 LIMIT 后,它返回预期的结果。

参考:http://bugs.developers.facebook.com/show_bug.cgi? id=9639

I did a bunch of testing on this. As far as I can tell there's some oddness with FQL when querying some tables. After adding a LIMIT to my status query it is returning the expected results.

Reference: http://bugs.developers.facebook.com/show_bug.cgi?id=9639

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