Facebook图表api:如何过滤应用程式资讯提供 [英] Facebook graph api : how to filter app feeds

查看:130
本文介绍了Facebook图表api:如何过滤应用程式资讯提供的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用图形API显示应用程序的所有Feed。
这是我的简单代码:

  $ url = $ facebook-> api('/'。$ _REQUEST [app]。'/ feed?date_format = U& limit = 10'); 
$ feed = $ url [data];
< pre><?php print_r($ feed); ?>< /预>

如您所见,这很简单。



pb:我只想从应用程序的Feed,而不是发布评论的所有用户。显然,这取决于应用程序的配置,但我想知道它是否在[from]参数上存在过滤器?



Thks
Vince

解决方案

最好的办法是在/ fql终结点使用FQL Query。



您将在表上使用查询,并在 stream_filter 表上使用一个子查询。 stream_filter


I use the graph api to display all the feed of an app. Here is my simple code :

$url = $facebook->api('/' . $_REQUEST["app"] . '/feed?date_format=U&limit=10');
$feed = $url[data];
<pre><?php print_r($feed); ?></pre>

As you can see, it's very easy.

The pb : i want only the feed from the app and not from all the users who post comments. Apparently, that's depend of the configuration of the app, but i wonder if it exists a filter on the [from] parameter ?

Thks Vince

解决方案

Your best bet is to use FQL Query on the /fql endpoint.

You'll use a query on the stream table and a subquery on the stream_filter table. Documentation on stream and stream_filter

这篇关于Facebook图表api:如何过滤应用程式资讯提供的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆