在请求facebook帖子时,是否可以将目标查询传递给图形api?如果是这样,应该如何做呢?
我发现了这个问题:
How to specify location targeting of FB post via Graph API
还有这张
Geotargeting Page Posts with the Facebook API
但是它似乎不起作用,我已经在图形资源管理器中尝试了以下内容。还有更多的排列。
PAGE_ID/posts?fields=targeting({'countries' : ['DE'] })
PAGE_ID/posts?fields=targeting("{'countries' : ['DE'] }")
PAGE_ID/posts?targeting={'countries' : ['DE'] }
PAGE_ID/posts?targeting={countries : ['DE'] }
PAGE_ID/posts?targeting="{'countries' : ['DE'] }"
PAGE_ID/posts?targeting="{countries : ['DE'] }"对于所有这些查询,我只能得到未过滤的结果或错误。
有没有正确的方法来做这件事,有没有什么文档?
发布于 2014-04-30 16:24:15
一般来说,您不能像使用Graph API那样使用查询限定。targeting和feed_targeting字段在发布帖子(https://developers.facebook.com/docs/graph-api/reference/page/feed#pubfields)时设置。
您可以尝试使用FQL流表来获取具有特定目标的帖子:
select post_id from stream where source_id={page_id} and feed_targeting.country in ('DE')请务必注意访问限制:
要读取流表,您需要当前会话用户能够查看的所有帖子的read_stream权限,以及查看当前会话用户所拥有的页面所做的任何帖子的read_insights权限。
https://stackoverflow.com/questions/23381658
复制相似问题