Facebook FQL API - APIError:1:发生未知错误

时间:2012-07-17 03:13:24

标签: ruby-on-rails facebook-fql

我有一个FQL查询给出了一个page_id来查找你的Facebook好友的照片location_post。

rest_client.fql_query("SELECT id, page_id, author_uid, coords, type, timestamp FROM location_post WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1=me()) AND type = 'photo' AND page_id = 212068492162618")

然而,它返回了APIError:1:发生了未知错误

  

Koala :: Facebook :: APIError:1:发生了未知错误   /opt/local/lib/ruby/gems/1.8/gems/koala-1.0.0/lib/koala/rest_api.rb:16:in   rest_call' from /opt/local/lib/ruby/gems/1.8/gems/koala-1.0.0/lib/koala.rb:55:in API”     从   /opt/local/lib/ruby/gems/1.8/gems/koala-1.0.0/lib/koala/rest_api.rb:13:in   rest_call' from /opt/local/lib/ruby/gems/1.8/gems/koala-1.0.0/lib/koala/rest_api.rb:7:in fql_query'来自(irb):51来自:0

如果我摆脱 author_uid IN(SELECT uid2 FROM friend WHERE uid1 = me()),如下或 page_id = 212068492162618 ,那么它可以工作

rest_client.fql_query("SELECT id, page_id, author_uid, coords, type, timestamp FROM location_post WHERE AND type = 'photo' AND page_id = 212068492162618 LIMIT 500")

知道为什么会这样吗?

由于

1 个答案:

答案 0 :(得分:0)

我相信你想要尝试的查询是

SELECT id,page_id,author_uid,coords,type,timestamp FROM location_post WHERE type ='photo'AND page_id = 212068492162618“

这将自动扩展到您在示例中给出的所有朋友 https://developers.facebook.com/docs/reference/fql/location_post/