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?