New FQL Multiquery in Graph API Javascript Example?

后端 未结 1 1762
甜味超标
甜味超标 2021-02-10 16:48

Anyone had luck with doing multiquery through javascript API or ajax?

1条回答
  •  鱼传尺愫
    2021-02-10 17:35

    I have successfully done this, although I had a bit of trouble at first with the documentation only having a php example.

    Just make sure you are attaching the queries json as the 2nd parameter in the api call rather than as a query string like in the php sample. That is:

    FB.api('/fql', {q:{"query1":"SELECT uid, rsvp_status FROM event_member WHERE eid=12345678","query2":"SELECT name, url, pic FROM profile WHERE id IN (SELECT uid FROM #query1)"}}, 
    function(response) {
        // handle response
    });
    

    0 讨论(0)
提交回复
热议问题