Question

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?

Was it helpful?

Solution

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)"}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top