New FQL Multiquery in Graph API Javascript Example?

…衆ロ難τιáo~ 提交于 2019-12-21 02:38:38

问题


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


回答1:


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
});


来源:https://stackoverflow.com/questions/7814486/new-fql-multiquery-in-graph-api-javascript-example

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!