Help with fql.multiQuery
- by Daniel Schaffer
I'm playing around with the Facebook API's fql.multiQuery method. I'm just using the API Test Console, and trying to get a successful response but can't seem to figure out exactly what it wants.
Here's the text I'm entering into the "queries" field:
{"tags" : "select subject
from photo_tag
where subject != 601599551
and pid in (
select pid
from photo_tag
where subject = 601599551
)
and subject in (
select uid2
from friend
where uid1 = 601599551
)",
"foo" : "select uid from user where uid = 601599551"}
All it'll give me is a queries parameter: array expected. error.
I've also tried just about every permutation I could think of involving wrapping the name/query pairs in their own curly braces, adding brackets, adding whitespace, removing whitespace in case it didn't want an associative array (for those watching the edits, I just found out about these wonderful things now... oy), all to no avail. Is there something painfully obvious I'm missing here, or do I need to make like Chuck Norris Jon Skeet and simply will it to do my bidding?
Update: A note to anyone finding this question now: The fql.multiquery test console appears to be broken. You can test your query by clicking on the generated url in the test console and manually adding the "queries" parameter into the querystring.