搜索 Facebook 用户的时间线

发布于 2025-01-01 16:33:20 字数 516 浏览 1 评论 0原文

我正在执行此 FQL 查询来搜索我自己的时间线上的墙上帖子:

https://graph.facebook.com/fql?q=SELECT+message+FROM+stream+WHERE+source_id=me()%20AND+strpos(消息,'metalica') +>0&access_token=XXXX

(抱歉,链接看起来不太好)

这不是应该返回我拥有的包含字符串“Metallica”的所有状态更新吗?错误?较旧的帖子(1-2 岁)不会返回,这是因为:

流表的每个查询仅限于之前的 30 天或 50 个帖子,以较大者为准,但是您可以使用特定于时间的字段。例如,created_time 与 FQL 运算符(例如 < 或 >)一起检索更大范围的帖子。

I'm executing this FQL query to search the wall posts on my own timeline:

https://graph.facebook.com/fql?q=SELECT+message+FROM+stream+WHERE+source_id=me()%20AND+strpos(message,'metallica')+>0&access_token=XXXX

(Sorry for the link, it didn't appear nice)

Is this not supposed to return all status updates I have that includes the string "metallica"? Am I doing something wrong? The older posts (1-2 years old) don't return. Is this because:

Each query of the stream table is limited to the previous 30 days or 50 posts, whichever is greater, however you can use time-specific fields such as created_time along with FQL operators (such as < or >) to retrieve a much greater range of posts.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

待天淡蓝洁白时 2025-01-08 16:33:20

我读了一篇关于 Facebook 查询如何工作的博客文章 (http://developers.facebook.com/blog/post/478/)

举例来说,我查询 SELECT post_id, message FROM stream WHERE source_id=me() AND comments .计数> 50 LIMIT 10

  1. 流项目的初始获取仅限于 10 个,这完全取决于它可以使用索引字段(在其文档页面上用星号标记)以及您指定的 LIMIT 获取的内容。请记住,这些是最新的流项目。
  2. 然后,添加的 WHERE 部分将从这 10 个中过滤掉,因此,如果这 10 个帖子中只有 1 个帖子的评论超过 50 条,那么您将得到 1 个结果。太糟糕了,对吧?

我相信最大限制是 5000,所以这将是您获得 Metallica 帖子的最佳选择。然而即便如此,Graph API 的可追溯性似乎还是有限的。有些人查看后发现,那里的帖子只能追溯到 2010 年,我无法超过 2009 年 4 月。也许我每年的帖子数量比其他人少,而且 API 的发布数量可能是基于帖子计数而不是基于日期店铺。

I read a blog article on how Facebook's queries work (http://developers.facebook.com/blog/post/478/)

Say for example I query SELECT post_id, message FROM stream WHERE source_id=me() AND comments.count > 50 LIMIT 10

  1. The initial get of stream items is limited to 10 solely based upon what it can fetch using the indexed fields (marked with an asterix on their documentation pages) as well as the LIMIT you specified. Remember, these are the most recent stream items.
  2. Then the addition WHERE parts are filtered off of those 10, so if you only had 1 post in those 10 with more than 50 comments, then you're going to get 1 result back. That sucks, right?

I believe the max limit is 5000, so that'd be your best bet for getting your Metallica posts. However even so, the Graph API seems to be limited in how far back it goes. Some people have looked and found that posts only going back to 2010 are there, I cannot get past April 2009. Maybe I have fewer postings per year that the others and it might be post count based rather than date based for how much the API will store.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文