4

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?

j0k
  • 22,600
  • 28
  • 79
  • 90
itwip
  • 51
  • 1
  • 3

1 Answers1

4

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)"}
Aviram Segal
  • 10,962
  • 3
  • 39
  • 52