Getting random “facebookErrDomain error 10000”

帅比萌擦擦* 提交于 2019-11-27 04:33:53

问题


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.

Has anyone ran into a similar issue?


回答1:


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"}
}
}



回答2:


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.

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 :)




回答3:


If that didnt work, look at the issues on 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]"

that's what messed me up




回答4:


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.



来源:https://stackoverflow.com/questions/4950337/getting-random-facebookerrdomain-error-10000

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!