Facebook图形API按类别过滤Feed [英] Facebook Graph Api filter feed by category
问题描述
有谁知道如何使用图形api按类别过滤用户提要?例如....我想拉用户的新闻饲料,只涉及到音乐像
http://graph.facebook.com/me/home?from_category=Music
任何帮助将不胜感激....谢谢!
尽我所知,没有直接的方式来查询但是如果您知道用户流的特定过滤器类型的filter_key,则可以使用标识符过滤器查询图形API。
所以我认为你需要做FQL查询才能得到过滤器关键字,如:
您可以从用户的流中获取所有可用的过滤器。请参阅文档
<1> SELECT filter_key FROM stream_filter WHERE uid =< uid>
<2>现在当你有你想要的
filter_key
时,你可以请求图api来获取带有 GET me / home?filter = filter_key
。在这里签出相应的文档 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!
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
这篇关于Facebook图形API按类别过滤Feed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!