ios 获取随机“facebookErrDomain 错误 10000”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4950337/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Getting random "facebookErrDomain error 10000"
提问by machunter
I am using the latest facebook IOS SDK, and I am getting random "facebookErrDomain error 10000"
, when using the requestWithGraphPath
. I can trigger the request from the UI and sometimes it runs fine, sometimes it gives me the error.
我正在使用最新的 facebook IOS SDK,并且"facebookErrDomain error 10000"
在使用requestWithGraphPath
. 我可以从 UI 触发请求,有时它运行良好,有时它给我错误。
Has anyone ran into a similar issue?
有没有人遇到过类似的问题?
采纳答案by machunter
The problem was due to the fact that during the development I had changed the permissions requested by the application. I had authorized my application say with permission x,y,z but I was only asking for x,y.
问题是由于在开发过程中我更改了应用程序请求的权限。我已经授权我的应用程序说允许 x,y,z 但我只要求 x,y。
What I had to do is to remove the application from the list of authorized applications and authorize it again with the appropriate permissions.
我必须做的是从授权应用程序列表中删除该应用程序,并使用适当的权限再次授权。
I wish they gave better error message :)
我希望他们给出更好的错误信息:)
回答by jollyr0ger
The error object returned has the details about what's happening. I suggest to implement that method to get more infos:
返回的错误对象包含有关正在发生的事情的详细信息。我建议实施该方法以获取更多信息:
- (void)request:(FBRequest *)request didFailWithError:(NSError *)error {
NSLog(@"%@", [error localizedDescription]);
NSLog(@"Err details: %@", [error description]);
};
For example for my problem gived me that info, and I've fixed it:
例如我的问题给了我那个信息,我已经修复了它:
2011-05-27 11:19:57.313 Challengein[7704:207] The operation couldn't be completed. (facebookErrDomain error 10000.)
2011-05-27 11:19:57.314 Challengein[7704:207] Err details: Error Domain=facebookErrDomain Code=10000 "The operation couldn't be completed. (facebookErrDomain error 10000.)" UserInfo=0x6878b90 {error=<CFBasicHash 0x6879be0 [0x141c400]>{type = mutable dict, count = 2,
entries =>
2 : <CFString 0x6877f70 [0x141c400]>{contents = "type"} = <CFString 0x686f9a0 [0x141c400]>{contents = "OAuthException"}
3 : <CFString 0x686d610 [0x141c400]>{contents = "message"} = <CFString 0x686f970 [0x141c400]>{contents = "(#100) picture URL is not properly formatted"}
}
}
回答by Tony
If that didnt work, look at the issues on GitHub https://github.com/facebook/facebook-ios-sdk/issues/closed#issue/205
如果这不起作用,请查看 GitHub https://github.com/facebook/facebook-ios-sdk/issues/closed#issue/205上的问题
In the plist file under URL types, make sure you set the value of "Item 0" to "fb123456" instead of "fb[123456]"
在 URL 类型下的 plist 文件中,确保将“Item 0”的值设置为“fb123456”而不是“fb[123456]”
that's what messed me up
这就是让我陷入困境的原因
回答by Mike Bretz
Check for the additional error_msg
of your error. I expect it to be an "OAuthException
" and an invalid/expired access_token. You need to provide a new access_token in case you got this error.
检查额外error_msg
的错误。我希望它是一个“ OAuthException
”和一个无效/过期的 access_token。您需要提供新的 access_token 以防出现此错误。