2013-04-18 75 views
1

我正在使用下面的查詢獲取頁面發佈結果和評論計數批量查詢POST方法。Facebook的帖子批量查詢

batch : [{"name":"post-resultset","method":"GET","relative_url":"me/posts?offset=0&limit=2"},{"method":"GET","relative_url":"fql?q=SELECT post_id, comment_info from stream where post_id IN ({result=post-resultset:$.data.*.id})"}]

我得到了響應,錯誤代碼400

{"error": {"message": "(#601) Parser error: unexpected '_435851216505244' at position 74.","type": "OAuthException","code": 601 }}

什麼是錯此查詢?

回答

0

這是由於POST_ID上,結果集後:。$數據* ID沒有用引號括起來,如

「relative_url」:「FQL Q = SELECT POST_ID,從流comment_info其中POST_ID IN(\ 「1234567_435851216505244 \」)」

我認爲這是一個Facebook的錯誤,你應該https://developers.facebook.com/bugs

enter image description here

+1

由於報告的bug。 [{ 「omit_response_on_success」:假的, 「名」: 「-結果集後」, 「方法」: 「GET」, 「relative_url」: 「我/帖」},{ 「方法」: 「GET」, 「relative_url」: 「fql?q =從其中post_id IN(\'{result = post-resultset:$。data。*。id} \')」}流中選擇comment_info此查詢適用於我。 – Mala 2013-04-23 14:38:59

+0

@PonmalaK嗨,我很好奇它是如何適用於你的,因爲它甚至無法使用圖形API瀏覽器 – 2013-04-30 15:24:45

+0

我得到了代碼200的響應。但它返回空json – Mala 2013-07-18 15:15:54