Facebook Graph Api filter feed by category

余生颓废 提交于 2019-12-11 01:14:31

问题


Does anyone know how to filter a users feed by category using the graph api? For instance.... I would like to pull the users news feed that relates to only Music like

http://graph.facebook.com/me/home?from_category=Music

Any help would be much appreciated.... Thanks!


回答1:


as much I know, there is no direct way to query graph api for getting filtered feed though if you know the filter_key for a particular filter type of a user stream,then you can query the graph api with identifier filter. so I think

1) you will need to make FQL query to get filter key, with something like: SELECT filter_key FROM stream_filter WHERE uid=<uid> you can get all the avalable filters from a user's stream. please refer the doc here

2) now when you have your desired filter_key then you can request graph api to get the filterd feed with GET me/home?filter=filter_key . checkout the corresponding documentation here




回答2:


Simply use

me?fields=id,name,music.limit(100)



来源:https://stackoverflow.com/questions/13203798/facebook-graph-api-filter-feed-by-category

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!