我使用默认的 Hello Facebook 示例。
Hello Facebook 示例项目是默认的,没有任何更改。
我运行应用程序,当我尝试登录 Facebook 时,出现错误:
> FBLoginView encountered an error=Error Domain=com.facebook.sdk Code=5
> "The operation couldn’t be completed. (com.facebook.sdk error 5.)"
> UserInfo=0x1ed594f0 {com.facebook.sdk:ErrorInnerErrorKey=Error
> Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server."
> UserInfo=0x1ed4b690
> {NSErrorFailingURLStringKey=https://graph.facebook.com/me?sdk=ios&migration_bundle=fbsdk%3A20130409&format=json&access_token=BAAFDDRlIT2wBAGKjngoxZCh3nkTWrfQjvO6ZASvctCGIyEg1h4gUA7n4zIIwd9iYZAWrRLkxEpVZB5SjHasSGbFll8aQGi42DGSxmjjvUxpbORWKNuYTaJwWSETLUSmmR6gZCG2FVFdJqorFbWZBxJwewfVpM1Ns4XwisSz4qQwdjKuWKaZATuOnzaYnyhWYMyp71zSMkXbUa8WGBLTovti5aWTZBckDlNZCTEtT5GKhie6eSgMEbjYDs,
> NSErrorFailingURLKey=https://graph.facebook.com/me?sdk=ios&migration_bundle=fbsdk%3A20130409&format=json&access_token=BAAFDDRlIT2wBAGKjngoxZCh3nkTWrfQjvO6ZASvctCGIyEg1h4gUA7n4zIIwd9iYZAWrRLkxEpVZB5SjHasSGbFll8aQGi42DGSxmjjvUxpbORWKNuYTaJwWSETLUSmmR6gZCG2FVFdJqorFbWZBxJwewfVpM1Ns4XwisSz4qQwdjKuWKaZATuOnzaYnyhWYMyp71zSMkXbUa8WGBLTovti5aWTZBckDlNZCTEtT5GKhie6eSgMEbjYDs,
> NSLocalizedDescription=Could not connect to the server.,
> NSUnderlyingError=0x1ed57120 "Could not connect to the server."},
> com.facebook.sdk:HTTPStatusCode=200,
> com.facebook.sdk:ErrorSessionKey=<FBSession: 0x1ede3c90, state:
> FBSessionStateOpen, loginHandler: 0x1ede3070, appID: 355198514515820,
> urlSchemeSuffix: ,
> tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0x1ede9990>,
> expirationDate: 2013-06-30 13:37:41 +0000, refreshDate: 2013-05-01
> 14:24:53 +0000, attemptedRefreshDate: 0001-12-30 00:00:00 +0000,
> permissions:( )>}
问题的原因是什么?
我尝试使用不同版本的 Facebook SDK(3.5.1、3.5、3.2.1)
我在 iOS 6.1 上使用 iPod Touch 4g
注意:在 SDK 3.5 https://developers.facebook.com/bugs/188127071335876中调用 requestNewPublishPermissions 时,我似乎在无限循环错误之后发生了这个问题, 因为当我在 2 周前尝试登录时,一切正常。