Reputation: 51
I am aiming to create a FQL query to retrieve all of my friends stream posts with their full name and email returned altogether. So I created a FQL multiquery (as below) but i keep getting empty result back (tried to put it in the Graph API Explorer):
"query1":"SELECT actor_id, message FROM stream
WHERE filter_key IN (SELECT filter_key FROM stream_filter WHERE uid = me())
AND actor_id IN (SELECT uid2 FROM friend WHERE uid1 = me())"
"query2":"SELECT uid, name FROM user WHERE uid IN (SELECT actor_id FROM #query1)"
Anyone get an idea how can I do this properly?
Does multiquery works in Graph API Explorer at all?
Upvotes: 4
Views: 2890
Reputation: 11120
You need to provide the query as a JSON Object, you were missing the object notation ({...}
) and a comma between queries.
This works:
{"query1": "SELECT actor_id, message FROM stream WHERE filter_key IN (SELECT filter_key FROM stream_filter WHERE uid = me()) AND actor_id IN (SELECT uid2 FROM friend WHERE uid1 = me())",
"query2":"SELECT uid, name FROM user WHERE uid IN (SELECT actor_id FROM #query1)"}
Upvotes: 4