通过 facebook graph api 获取特定数据
是否有可能如何通过图形 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
嘿司马,我完全明白你在说什么。
Graph 中没有办法做你想做的事(至少我发现)。我使用 FQL 和过滤器完全按照您的要求进行操作。您可以通过照片、视频和其他一些选项来过滤提要。
1)查询filter_stream表以获取过滤器列表。
2)过滤饲料。
参考: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.
2) Filter the feed.
Reference: http://developers.facebook.com/docs/reference/fql/
https://graph.facebook.com/me/statuses?access_token=blablablabla
连接列表位于:http://developers.facebook.com/docs/reference /api/用户/
https://graph.facebook.com/me/statuses?access_token=blablablabla
The list of connections is here: http://developers.facebook.com/docs/reference/api/user/
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.