开发者

Facebook FQL to get all status messages from an app

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 s开发者_Go百科o that it works?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜