简体   繁体   English

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

[英]Facebook Graph API returning different pages for different access tokens

I have been using the Graph API normally for the past two months, but suddenly something strange started happening. 在过去的两个月中,我一直在正常使用Graph API,但突然开始发生一些奇怪的事情。

I have the following URL: 我有以下网址:

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

What happens is that when I use the access token related to the account that I have been using for the past two months, it simply does not return the most popular pages related to this keyword. 发生的事情是,当我使用与过去两个月来一直在使用的帐户相关的访问令牌时,它根本不会返回与此关键字相关的最受欢迎页面。 This is the return: 这是回报:

{
  "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
  }, ....

However, when I tried using the access token from a different Facebook account, it returned the results starting from the the most popular page, which was happening with the other account until today. 但是,当我尝试使用来自其他Facebook帐户的访问令牌时,它从最受欢迎的页面开始返回了结果,而该页面直到今天才在其他页面上发生。 This is the result: 结果如下:

{
  "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
  }, ....

I noticed that the same happened with other keywords that I had been using very frequently. 我注意到,我经常使用的其他关键字也发生了同样的情况。

Can someone help me understand what is going on? 有人可以帮助我了解发生了什么吗?

We are struggling with a similar version of this. 我们正在努力与此类似的版本。 We are using our application token and getting very few results when we know there are many results to be returned as we can seen them using the Graph search UI. 我们正在使用我们的应用程序令牌,并且当我们知道有很多结果要返回时,得到的结果很少,因为使用Graph搜索UI可以看到它们。 If one person submits the query using our access_token, he gets a handful of results -- I think 14. If I cut and paste the exact same URL string (same token) into my browser, I get 2 results. 如果有人使用我们的access_token提交查询,他会得到一些结果-我认为是14。如果我将完全相同的URL字符串(相同令牌)剪切并粘贴到浏览器中,则会得到2个结果。

Facebook says this is "works as designed" but it is not the behavior we are seeking: Facebook说这是“按设计工作”,但这不是我们正在寻求的行为:

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

Here is the API query string 这是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

and what we think is an equivalent browser search: 我们认为这是等效的浏览器搜索:

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

It would seem that there should be a way to reduce the user-variability and regardless, the variability seems to be unreasonably high. 似乎应该有一种减少用户可变性的方法,并且可变性似乎过高。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM