0

这是我在离线模式下尝试从 facebook 获取一些信息时收到的错误:([错误描述])

Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" 
UserInfo=0x13f76dd0 {com.facebook.sdk:ErrorInnerErrorKey=Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo=0x13f76860 {NSErrorFailingURLStringKey=https://graph.facebook.com/me/?
fields=name,location,gender,birthday,relationship_status&sdk=ios&migration_bundle=fbsdk%3A20121003&format=json&access_token=xxx, NSErrorFailingURLKey=https://graph.facebook.com/me/?
fields=name,location,gender,birthday,relationship_status&sdk=ios&migration_bundle=fbsdk%3A20121003&format=json&access_token=xxx, NSLocalizedDescription=The Internet connection appears to be offline., 
NSUnderlyingError=0x13e86790 "The Internet connection appears to be offline."}, com.facebook.sdk:HTTPStatusCode=200}

我想得到这个:The Internet connection appears to be offline.

这个也没有得到我想要的:

NSString *description = [error localizedDescription];
NSString *message = [error localizedRecoverySuggestion];

这个错误是facebook sdk error 5。([错误代码] = 5)

你能帮助我吗?

4

1 回答 1

0

尝试

NSError* underlyingError = [[error userInfo] valueForkey:NSUnderlyingErrorKey];
NSString* description = [underlyingError localizedDescription];
于 2012-11-11T22:30:37.783 回答