【问题标题】:Facebook API, get friends from specific location using current_locationFacebook API,使用 current_location 从特定位置获取朋友
【发布时间】:2011-07-17 10:46:51
【问题描述】:

我无法使用 current_location 属性在特定位置查找用户的朋友。这是我的查询:

SELECT name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND  
current_location = 103723936333579

即使我知道用户的许多朋友都住在 id 为 103723936333579 的位置,这总是返回空。我知道 current_location 是一个数组,但如果我写:

SELECT name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND  
current_location.id = 103723936333579

... 获取数组的 id 我得到一个错误。点符号似乎对我不起作用。

谢谢

【问题讨论】:

    标签: ios facebook


    【解决方案1】:

    Facebook FQL 查询不支持像您尝试执行的那样通过数组元素进行查询。我能想到的唯一方法是返回所有用户及其 current_location 字段并遍历每个用户及其 current_location 值。

    您需要提示用户授予 friends_checkins 扩展权限,以确保填充 current_location 值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多