facebook grap API 的异常行为(“类型":“GraphMethodException",“代码":100) [英] Unusual behavior of facebook grap API ("type": "GraphMethodException", "code": 100)

查看:23
本文介绍了facebook grap API 的异常行为(“类型":“GraphMethodException",“代码":100)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在通过图形 API 为某些用户获取一些数据时遇到了一些异常错误.例如,我们都知道我们可以通过 graph.facebook.com/username 获取基本的用户信息它有效.但它不适用于某些用户.就像用户 www.facebook.com/sanzida.tanzum 是一个有效的 Facebook 用户.所以,我们应该通过graph.facebook.com/sanzida.tanzum来获取她的基本信息.但是当你尝试这样做时,你会得到错误

I am having some unusual errors while fetching some data for some users via graph API. As for example w all know we can get basic user info via graph.facebook.com/username And it works. But it is not working for some users. Like the user www.facebook.com/sanzida.tanzum is a valid facebook user. So, we should get her basic info via graph.facebook.com/sanzida.tanzum. But when you will try that, you will get the error

 {
   "error": {
      "message": "Unsupported get request.",
      "type": "GraphMethodException",
      "code": 100
   }
}

这不是权限问题,因为当用户尝试通过图形 API 检索自己的数据时,她自己也会遇到同样的错误.实际上用户 sanzida.tanzum 对图形 API 是不可见的.例如,用户 sanzida.tanzum 在我的好友列表中.你可以在这里查看.我的好友列表.(这是公开的).但是当我通过图形 API 检索我的好友列表时,我的好友列表显示为不包括用户 sanzida.tanzum !但她在我的好友列表中!我已尝试就此事联系 Facebook,因为我没有找到任何与此事相关的文档.他们回答说这是正常的.(可能他们根本没有阅读我的邮件.我包括与 facebook 的电子邮件对话)

And it is not a permission issue because use user herself gets the same error when she try to retrive her own data via graph API. Actually the user sanzida.tanzum is invisible to graph API. For example user sanzida.tanzum is on my friend list. You can check here. my friendlist.(it is public). But when I retrive my friendlist via graph API, my friendlist is shown excluding the user sanzida.tanzum ! But she is in my friendlist! I have tried to contact facebook for this matter because I did not find any doccument related to this matter. They replied it is usual. (probably they did not read my mail at all. I am including the email conversation with facebook)

嗨তৌফিক,

他们收到错误是因为他们不是你……他们没有查看您所做的相同事情的权限.他们也可能失踪访问令牌.无论哪种方式:这里都没有错误.

They are getting errors because they are not you... they dont have permissions to see the same things you do. They might also be missing an access token. Either way: no bug here.

谢谢,

Emrakul 安全 Facebook

Emrakul Security Facebook

-----原始消息----- 发件人:*****@ovi.com 收件人:主题:报告安全漏洞 - facebook 图形 API 中的异常错误

-----Original Message----- From: *****@ovi.com To: Subject: Report a Security Vulnerability - Unusual bug in facebook graph API

您的电子邮件地址:*****@ovi.com 您有安全漏洞?:是漏洞类型:隐私/身份验证漏洞范围:平台开发人员 API 标题:facebook 图形 API 产品/URL 中的异常错误:https://graph.facebook.com/sanzida.tanzum 描述和影响:我正在做一些图形 API 调用以进行测试.主要是我在做主要是用户配置文件调用.(https://graph.facebook.com/exampleuser)

Your Email Address: *****@ovi.com Do you have technical details of a security vulnerability?: Yes Vulnerability Type: Privacy / Authentication Vulnerability Scope: Platform Developer API Title: Unusual bug in facebook graph API Product / URL: https://graph.facebook.com/sanzida.tanzum Description and Impact: I was doing some graph API calls for testing purpose. Mostly I was doing mostly user profile calls. (https://graph.facebook.com/exampleuser)

不知怎的,我意识到 Facebook 正在为某些用户提供以下错误甚至他们在我的朋友名单上.当他们尝试时会发生同样的事情自己.

Somehow I realized facebook is giving following errors for some users even they are on my friendlist. Same thing occurs when they try by themselves.

例如用户https://www.facebook.com/sanzida.tanzum"已开启我的好友列表.(我的好友列表是公开的.你可以查看是否需要.)所以,根据facebook graph API,我可以请求用户的基本信息信息使用 (https://graph.facebook.com/sanzida.tanzum) 但它返回这个错误:

As for eample the user "https://www.facebook.com/sanzida.tanzum" is on my friendlist. (My friendlist is public.You can check if you want.) So, according to facebook graph API, I can request the user's basic info using (https://graph.facebook.com/sanzida.tanzum) But it returns this error:

"{ "错误": {"message": "不支持的获取请求.","type": "GraphMethodException","代码": 100 } }"

"{ "error": { "message": "Unsupported get request.", "type": "GraphMethodException", "code": 100 } }"

实际上图形 API 无法访问此用户的任何内容.其他例如.. 当我通过图形 API 请求我的好友列表时,所有好友我的好友列表显示除了用户 (sanzida.tanzum).但她在我的好友列表!在这里查看(我的好友列表是公开的)https://www.facebook.com/toufiqueimam/friends".那么这是为什么只发生在少数用户身上?

Actually graph API can't access nothing of this user. Another example.. When I request my friendlist via graph API , All friends of my friendlist is shown except the user (sanzida.tanzum). But she is in my friendlist! check here (my friendlist is public) "https://www.facebook.com/toufiqueimam/friends". So why is this happening only for few users?

刚才我确认用户自己也遇到了同样的错误如果她尝试访问 (https://graph.facebook.com/sanzida.tanzum)

Just now I got confirmation that the user herself gets the same error if she tries to access (https://graph.facebook.com/sanzida.tanzum)

{错误":{"message": "不支持的获取请求.","type": "GraphMethodException",代码":100 } }

{ "error": { "message": "Unsupported get request.", "type": "GraphMethodException", "code": 100 } }

复制说明/概念证明:复制:先行到 https://www.facebook.com/sanzida.tanzum 你会看到这是一个有效的轮廓.现在试试 https://graph.facebook.com/sanzida.tanzum 你会得到以下错误

Reproduction Instructions / Proof of Concept: Reproduction: first go to https://www.facebook.com/sanzida.tanzum You will see it is a valid profile. Now try https://graph.facebook.com/sanzida.tanzum You will get following error

{错误":{"message": "不支持的获取请求.","type": "GraphMethodException",代码":100 } }

{ "error": { "message": "Unsupported get request.", "type": "GraphMethodException", "code": 100 } }

推荐答案

这不是错误,错误意味着您尝试访问的数据无法访问,不存在,已被删除,不可用,因为您没有提供可以看到它的用户的访问令牌等.

This isn't a bug, the error means that the data you're trying to access is not accessible to you, does not exist, has been deleted, is not available because you haven't provided an access token from a user who can see it, etc.

有关与 Facebook 页面相关的此错误消息的示例,请参阅此答案:https://stackoverflow.com/a/6847088/21062 - 如果该用户已阻止您、阻止您的应用程序、禁用其帐户或禁用所有应用程序访问其信息,则尝试访问用户个人资料时也是如此.

See this answer for an example of this error message in relation to Facebook pages: https://stackoverflow.com/a/6847088/21062 - the same is true when trying to access user profiles if that user has blocked you, blocked your app, disabled their account or disabled all apps from accessing their information.

这篇关于facebook grap API 的异常行为(“类型":“GraphMethodException",“代码":100)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆