Facebook FQL。 哪个是按日期/时间排序的单个查询中获取所有页面更改的最简单方法?

Facebook FQL。 哪个是按日期/时间排序的单个查询中获取所有页面更改的最简单方法?

问题描述:

I need to monitor one single page and all related activities. This is the result I'm trying to accomplish:

29/10 - User: John - Action: Like    - Object type: status - Object id: 123456
29/10 - User: Mary - Action: Comment - Object type: status - Object id: 123343
29/10 - User: Etan - Action: Tagged  - Object type: status - Object id: 123537
29/10 - User: Arth - Action: Like    - Object type: status - Object id: 123876
29/10 - User: Jack - Action: Post    - Object type: status - Object id: 123423
29/10 - User: Jack - Action: Photo   - Object type: photo - Object id: 123423

You can take as example the search by term, that provide everything as expected. We have in one single call comments, posts, statuses and photos ordered since the specified date/time:

https://graph.facebook.com/search?q=watermelon&type=post

Since there's no way to do it simple as the /search?q=, how can I do it with FQL?

Should I use the stream table? In that case, which filter of the stream_table should I apply?

Is there an easy way to do that or do I have to get every thing in separated queries?

(If it helps: I'm using Facebook PHP SDK)

我需要监控一个页面和所有相关活动。 这是我想要完成的结果: p>

  29/10  -  User:John  -  Action:Like  -  Object type:status  -  Object id:123456 
29 / 10  - 用户:Mary  - 动作:评论 - 对象类型:状态 - 对象ID:123343 
29 / 10  - 用户:Etan  - 动作:标记 - 对象类型:状态 - 对象ID:123537 
29 / 10  - 用户:Arth  - 动作 :喜欢 - 对象类型:状态 - 对象ID:123876 
29 / 10  - 用户:杰克 - 动作:发布 - 对象类型:状态 - 对象ID:123423 
29 / 10  - 用户:杰克 - 动作:照片 - 对象类型:  photo  - 对象ID:123423 
  code>  pre> 
 
 

您可以按术语搜索,按预期提供所有内容。 我们在指定的日期/时间内只需一次通过评论,帖子,状态和照片: p>

https://graph.facebook.com/search?q=watermelon&type=post p>

因为没有 这样做的方法很简单,如 / search?q = code>,我怎么能用FQL做呢? p>

我应该使用 stream code >表? 在这种情况下,我应该应用 stream_table code>的哪个过滤器? p>

是否有一种简单的方法可以做到这一点,或者我必须在分离的查询中获取所有内容 ? p>

(如果有帮助:我正在使用Facebook PHP SDK) p> div>

We are also using this technique but there is still an issue. The stream table returns the Top Posts view of the feed and not the Most recent one EVEN if you specify an ORDER BY updated_time DESC.

So you might miss posts, especially posts from fans. We have not found a solution to this problem...

I ran into the same problem recently. Initially I thought that the feed connection of a page will be what I need, but it turns out that if you sort with since or until it will look at a post's created_at attribute. This means that comments on older posts won't show up.

The best solution I could find is to first do a FQL query on the stream table to get the post ids:

SELECT post_id FROM stream WHERE source_id = {PAGE_ID} AND updated_time > {TIME}

and then simply get all the posts at once:

https://graph.facebook.com?ids=ID1,ID2,ID3...