问题
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