Facebook FQL获取位置的所有帖子 [英] Facebook FQL Get All Posts At Location

查看:94
本文介绍了Facebook FQL获取位置的所有帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

location_post FQL表描述如下:


一个FQL表,返回与
相关联的位置并满足至少有以下条件之一:

An FQL table that returns Posts that have locations associated with them and that satisfy at least one of the following conditions:


  • 您被标记在帖子

  • you were tagged in the Post

朋友被标记在Post

a friend was tagged in the Post

你创作的帖子

一个朋友撰写了Post

a friend authored the Post

所以我写了以下FQL脚本,旨在获得我的朋友和我在某个位置所做的所有帖子:

So I wrote the following FQL script with the intent of getting all posts my friends and I had made at a certain location:

SELECT id,message,post_id,timestamp FROM location_post WHERE page_id = 303736809701751

但是,返回一个空数据集。在这种特殊情况下,我希望我自己的一些帖子可以被退回,尽管我已经尝试过应该已经返回朋友的帖子的其他地方ids。

However, an empty data set is returned. In this particular case, I expect some of my own posts to be returned, though I have tried other place ids that should have returned friends' posts as well.

或者这是我应该向Facebook报告的错误?

What is missing from the request, or is this a bug I should report to Facebook?

推荐答案

从文档中引用的段落只是说表 仅包含您自己和朋友的地方。它试图解释说你不会在那里找到公共用户。

The paragraph you quoted from the doc just says that the table only contains places where yourself and friends of yours have been. It tries to explain that you will not find public users there.

location_post 表的查询不会自动为您指定相关ID。如果你想搜索你朋友所在的地方,那么你将不得不向你的朋友指出 。如果您只对一大堆朋友感兴趣,只需添加相关ID。

A query to the location_post table does not automatically specify the concerned IDs for you. If you want to search for the places where all your friends have been, you will have to indicate all your friends. If you are only interested by a bunch of friends, just add the concerned IDs.

应该这样做。

SELECT id, message, post_id, timestamp
  FROM location_post 
 WHERE (author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) 
          OR author_uid = me() 
          OR tagged_uids IN (SELECT uid2 FROM friend WHERE uid1 = me()) 
          OR tagged_uids = me()) 
       AND page_id = 303736809701751

这篇关于Facebook FQL获取位置的所有帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆