简体   繁体   English

使用Facebook图形API从用户Wall Feed仅获取照片

[英]Get only photos from users wall feed using facebook graph api

https://graph.facebook.com/me/home?access_token=token

will return all feeds for a user news feed. 将返回用户新闻提要的所有提要。 But i am looking for filters like type=post or type=photos etc 但是我正在寻找像type = post或type = photos等的过滤器

Is this functionality available in facebook api?? Facebook API是否提供此功能?

You can filter results in home connection of user filtered by user's stream filters by using filter argument. 您可以过滤结果home的连接user通过使用用户的流过滤器过滤filter参数。 For example photos may be accessed with: 例如,可以通过以下方式访问照片:

https://graph.facebook.com/me/home?filter=app_2305272732

And Links: 和链接:

https://graph.facebook.com/me/home?filter=app_2309869772

filter should be one of those returned by next FQL query: filter应为下一个FQL查询返回的filter之一:

SELECT filter_key FROM stream_filter WHERE uid=me()

See stream_filter table for details. 有关详细信息,请参见stream_filter表。

BTW: Beware, not everything may be possible to use as filters, for example statuses (those easier to access via /me/statuses than via /me/home )... 顺便说一句:当心,并不是所有的东西都可以用作过滤器,例如状态(通过/me/statuses访问比通过/me/home容易访问)...

我找不到它的记录,但是我只是尝试了以下URL,它起作用了:

https://graph.facebook.com/me/home/photos?access_token=token

For anyone looking to do this with fql , I recently wrote a blog post of getting photos and videos from Facebook news feed. 对于希望通过fql进行此fql ,我最近写了一篇博客文章 ,内容是从Facebook新闻提要中获取照片和视频。 And here is the query that I use. 这是我使用的查询。

SELECT actor_id, created_time, likes, post_id, attachment FROM stream WHERE filter_key IN ( SELECT filter_key FROM stream_filter WHERE uid = me() AND (name = "Photos" OR name = "Video"))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM