【发布时间】:2014-03-12 01:47:42
【问题描述】:
我正在使用 PHP SDK 来获取公共帖子中某个关键字的结果
$q = "something";
$results = $facebook->api('/search/','get',array('q'=>$q,'type'=>'post','limit'=>10));
此查询返回与此类似的结果:
Array
(
[id] => id
[from] => Array
(
[name] => Some Random Name
[id] => id
)
[message] => Hello hello hello. something
[privacy] => Array
(
[value] =>
)
[type] => status
[created_time] => 2013-10-31T10:20:58+0000
[updated_time] => 2013-10-31T10:20:58+0000
)
正如您看到的 [type] => status 部分,这可以是状态、照片、链接等。我只想从包含搜索关键字的公开帖子中获取照片(在换句话说,在包含 $q 的公共帖子中搜索并过滤/获取/限制 10 个只有 [type] => 照片值的结果)
我怎样才能做到这一点?我认为 FQL 对此无能为力,因为我在公共帖子中进行搜索。
【问题讨论】:
-
你试过 FB Graph api 调试器吗?
-
如果你指的是 Graph API Explorer,是的
标签: php facebook facebook-graph-api types filter