Graph API的搜索返回相当少于Facebook用户面临搜索的公开帖子? [英] Graph API's search returning considerately less public posts than Facebook's user facing search?
问题描述
然而,当我通过Graph API发布相同的搜索结果时返回错过标准用户界面中显示的许多帖子。标准搜索返回的许多最近的帖子都丢失(将access_token替换为您所拥有的):
有没有人有什么想法可以导致这个,我可以如何解决它?我有客户质疑我的应用程序的质量,因为这个差异。
非常感谢,
Boaz
这是因为Graph API使用分页,如果它返回太多的对象,如果你看看Nike搜索的响应的底部,你会发现: / p>
分页:{
previous:https://graph.facebook.com/search?q = nike& type = post& access_token = XX& limit = 25& since = 1322257702& __ previous = 1,
next:https://graph.facebook.com/search?q=nike&type = post& access_token = XX& limit = 25& until = 1322246079
}
向下一个网址发出另一个请求,以获取更多结果。
I'm developing an application based on facebook's data using the Graph API. Part of the functionality entails searching Facebook's public post, essentially in the same fashion that Facebook does on www.facebook.com/search:
However, when I issue the same search via the Graph API, the results return miss many of the posts shown in the standard user interface. Many of the most recent posts returned by the standard search are missing (replace the access_token to the one you have):
https://graph.facebook.com/search?q=thanksgiving&type=post&access_token=XXXX
Does anyone have an idea what can cause this and how I can work around it? I have customer questioning the quality of my application because of this difference.
Many thanks, Boaz
That is because the Graph API uses pagination if it returns too many objects, if you take a look on the bottom of the response of the "Nike" search you will find this:
"paging": {
"previous": "https://graph.facebook.com/search?q=nike&type=post&access_token=XX&limit=25&since=1322257702&__previous=1",
"next": "https://graph.facebook.com/search?q=nike&type=post&access_token=XX&limit=25&until=1322246079"
}
Just make another request to the "next" url in order to fetch more results.
这篇关于Graph API的搜索返回相当少于Facebook用户面临搜索的公开帖子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!