views:

232

answers:

2

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?

A: 

Does your app ask for permissions to view friends statuses?

Yuliy
Yep. I can view statuses for an individual fine. There's something wrong about the query itself.
Richard
A: 

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

Richard

related questions