【问题标题】:fql to get location posts by me or my friends with me taggedfql 获取我或我的朋友标记的位置信息
【发布时间】:2012-08-16 20:30:51
【问题描述】:

这就是我要找的东西:

选择 author_uid, tagged_uids, page_id from location_post where author_uid = me() 或 ( author_uid in (select uid2 from friend where uid1=me()) and me() in tagged_uids)

当我拆分查询时,它们会返回预期的结果。

即两者都

  1. 从 location_post where author_uid = me() 中选择 author_uid、tagged_uids、page_id
  2. select author_uid, tagged_uids, page_id from location_post where author_uid in (select uid2 from friend where uid1=me()) and me() in tagged_uids

按预期工作。我需要的是2的结合。 我很想说这是 API 中的错误(或限制)

注意:

  1. 如果硬编码我朋友的 id 和我的 id 之一,则 OR 子句本身有效。即 author_uid= 或(author_uid= and in tagged_uids)

【问题讨论】:

    标签: union facebook-fql facebook-rest-api


    【解决方案1】:

    问题是查询中的 me()。我有用户的 ID 并用实际 ID 替换 me() 完成了这项工作

    SELECT id, author_uid, page_id, tagged_uids, timestamp, coords FROM location_post WHERE (<id> IN tagged_uids or author_uid = <id>)
    

    【讨论】:

      【解决方案2】:


      你试图做的事情不会奏效。您可以尝试运行多查询并立即获取结果并最终进行比较。

      【讨论】:

      • 感谢您的回复。你是对的,我正在尝试没有工作。我添加了一个描述有效方法的答案!
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-08
      • 1970-01-01
      • 2013-04-21
      • 1970-01-01
      • 1970-01-01
      • 2011-03-26
      • 1970-01-01
      相关资源
      最近更新 更多