Facebook Graph API为不同的访问令牌返回不同的页面

时间:2013-09-09 13:52:21

标签: php facebook facebook-graph-api access-token

过去两个月我一直在使用Graph API,但突然发生了一些奇怪的事情。

我有以下网址:

https://graph.facebook.com/search?access_token=
{$access_token}&q=obama&type=page

当我使用与过去两个月一直使用的帐户相关的访问令牌时,它只会返回与此关键字相关的最热门页面。这是回报:

{
  "data": [
  {
     "id": "593850270658078",
     "name": "Obama - The Worst President",
     "category": "Public figure",
     "likes": 16133,
     "talking_about_count": 27276
  },
  {
     "id": "363569443676394",
     "name": "2016: Obama's America",
     "category": "Movie",
     "likes": 291045,
     "talking_about_count": 8406
  },
  {
     "id": "524144210948251",
     "name": "Obama Won! U MAD?",
     "category": "Comedian",
     "likes": 93222,
     "talking_about_count": 17931
  },
  {
     "id": "249903348378912",
     "name": "Obama Makes Me Puke",
     "category": "Just for fun",
     "likes": 85377,
     "talking_about_count": 232842
  },
  {
     "id": "215380238549857",
     "name": "ObamaWear",
     "category": "Clothing",
     "likes": 5771,
     "talking_about_count": 4
  },
  {
     "id": "434951966574117",
     "name": "Obamagump.com",
     "category": "Political organization",
     "likes": 2336,
     "talking_about_count": 686
  },
  {
     "id": "235805483212602",
     "name": "ObamaCalls",
     "category": "Website",
     "likes": 1849,
     "talking_about_count": 7
  },
  {
     "id": "475266032570062",
     "name": "Obama, stay away from SYRIA",
     "category": "Community",
     "likes": 712,
     "talking_about_count": 531
  }, ....

但是,当我尝试使用来自其他Facebook帐户的访问令牌时,它会从最受欢迎的页面返回结果,该页面与其他帐户一起发生,直到今天。这是结果:

{
  "data": [
  {
     "id": "6815841748",
     "name": "Barack Obama",
     "category": "Politician",
     "likes": 36654370,
     "talking_about_count": 563401
  },
  {
     "id": "22092775577",
     "name": "Michelle Obama",
     "category": "Public figure",
     "likes": 10006156,
     "talking_about_count": 122888
  },
  {
     "id": "250438165090859",
     "name": "Malia Obama.",
     "category": "Public figure",
     "likes": 439221,
     "talking_about_count": 78225
  },
  {
     "id": "325578590837480",
     "name": "Obamacare",
     "category": "Community",
     "likes": 515138,
     "talking_about_count": 23672
  },
  {
     "id": "424717587573142",
     "name": "Bardock Obama",
     "category": "Comedian",
     "likes": 151115,
     "talking_about_count": 55308
  },
  {
     "id": "593850270658078",
     "name": "Obama - The Worst President",
     "category": "Public figure",
     "likes": 16121,
     "talking_about_count": 21111
  },
  {
     "id": "363569443676394",
     "name": "2016: Obama's America",
     "category": "Movie",
     "likes": 291045,
     "talking_about_count": 8406
  },
  {
     "id": "296856040436954",
     "name": "Obama is the Worst President in US History",
     "category": "Community",
     "likes": 693421,
     "talking_about_count": 108681
  },
  {
     "id": "214488188596423",
     "name": "Impeach Obama",
     "category": "Cause",
     "likes": 98256,
     "talking_about_count": 25708
  }, ....

我注意到我经常使用的其他关键字也是如此。

有人可以帮我理解发生了什么吗?

1 个答案:

答案 0 :(得分:1)

我们正在努力解决类似版本的问题。当我们知道有许多结果要返回时,我们正在使用我们的应用程序令牌并获得非常少的结果,因为我们可以使用图形搜索UI看到它们。如果一个人使用我们的access_token提交查询,他会得到一些结果 - 我认为14.如果我将完全相同的URL字符串(相同的标记)剪切并粘贴到我的浏览器中,我会得到2个结果。

Facebook称这是“按设计工作”,但这不是我们正在寻求的行为:

https://developers.facebook.com/bugs/161678720693595

以下是API查询字符串

https://graph.facebook.com/search?q=bevmo&type=page&limit=1000&access_token=REMOVED&fields=id,link,username,name,website,description,about,category,location

我们认为是等效的浏览器搜索:

https://www.facebook.com/search/str/bevmo/pages-named

似乎应该有一种方法来减少用户变异性,无论如何,变化似乎都不合理地高。