通过 facebook graph api 获取特定数据

发布于 2024-10-09 03:22:44 字数 304 浏览 1 评论 0原文

是否有可能如何通过图形 API 从 facebook 新闻提要中获取任何特定类型的帖子?例如,在我的新闻提要中,我有状态、链接、照片、视频等。我只想获取具有类型的帖子=图api上的状态..我在文档中看到了一些获取参数,但没有像?type=link..所以我尝试过/me/home?type=link,但不出所料它不起作用:D

所以有人知道吗如何做到这一点?我可以在我的 PHP 应用程序中过滤它,但随后我需要获取一些进一步的数据。当我收到 20 个帖子且只有 10 个状态时,我需要添加 10 个重新处理?这太有可能了,但我不知道该怎么做:D

请帮忙..!谢谢!

is there any possibility how to fetch any specific type of posts from facebook news feed via graph api?For example on my news feed I have statutuses, links, photos, vidoes, and so on..I only want to get the ones with type=status over graph api..I have seen some get parameters in documentation, but nothing like ?type=link..So I have tried /me/home?type=link, but unsurprisingly it have not worked:D

So does anyone know how to do that?I can filter it in my PHP app, but then I need to get some further data..When I got 20 posts and only 10 would be statuses, I need to add the 10 remaiming? It is too possible, but I dont know how to do that:D

Please help..!Thanks!

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

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

发布评论

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

评论(3

往事风中埋 2024-10-16 03:22:44

嘿司马,我完全明白你在说什么。

Graph 中没有办法做你想做的事(至少我发现)。我使用 FQL 和过滤器完全按照您的要求进行操作。您可以通过照片、视频和其他一些选项来过滤提要。

1)查询filter_stream表以获取过滤器列表。

SELECT name,filter_key FROM stream_filter WHERE uid=me()

2)过滤饲料。

SELECT xxx FROM stream WHERE filter_key='app_xxxx'

参考:http://developers.facebook.com/docs/reference/fql/

Hey Sima, I understand exactly what you are talking about.

There is no way in Graph to do what you want (at least that I have found). I do exactly what you want using FQL and filters. You can filter the feed by photos, videos, a few other options.

1) query the filter_stream table to get list of filters.

SELECT name,filter_key FROM stream_filter WHERE uid=me()

2) Filter the feed.

SELECT xxx FROM stream WHERE filter_key='app_xxxx'

Reference: http://developers.facebook.com/docs/reference/fql/

清引 2024-10-16 03:22:44

http://graph.facebook.com//feeds?limit= 20(在浏览器中尝试此操作,将替换为用户 ID 或用户名)

这将返回所有墙提要。如果您想将其限制为仅wallfeeds,我认为您可以通过编程来完成。你可以通过查看字符串来弄清楚。

http://graph.facebook.com/<UID>/feeds?limit=20 (try this in your browser, replacing <UID> with a user ID, or username )

This will return all the wall feeds. If you want to limit it to only wallfeeds , i think you can do it programatically. You can figure it out by looking at the string.

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