-1

The strange thing is that is works just fine on an iPhone 5. But I get this error on iPhone 5s. The iOs version does not matter. I tested on iOS 7.0 and 7.1 on iPhone 5s and it still doesn't work.

2014-05-10 15:47:09.023 FitGoal[929:60b] FBLoginView encountered an error=Error Domain=com.facebook.sdk Code=2 "The operation couldn’t be completed. (com.facebook.sdk error 2.)" UserInfo=0x178264900 {com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:UserLoginCancelled, com.facebook.sdk:ErrorSessionKey=<FBSession: 0x178115450, state: FBSessionStateClosedLoginFailed, loginHandler: 0x0, appID: 676311875766710, urlSchemeSuffix: , tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0x170010230>, expirationDate: (null), refreshDate: (null), attemptedRefreshDate: 0001-12-30 00:00:00 +0000, permissions:(null)>}

I got this error on another iPhone 5s as well:

2014-05-09 18:03:27.996 FitGoal[11685:60b] FBLoginView encountered an error=Error Domain=com.facebook.sdk Code=2 "The operation couldn’t be completed. (com.facebook.sdk error 2.)" UserInfo=0x17826dc80 {com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:SystemLoginError, com.facebook.sdk:ErrorInnerErrorKey=Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: Invalid application 676311875766710" UserInfo=0x17826d800 {NSLocalizedDescription=The Facebook server could not fulfill this access request: Invalid application 676311875766710}, com.facebook.sdk:ErrorSessionKey=<FBSession: 0x178107230, state: FBSessionStateClosedLoginFailed, loginHandler: 0x0, appID: 676311875766710, urlSchemeSuffix: , tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0x17801e7b0>, expirationDate: (null), refreshDate: (null), attemptedRefreshDate: 0001-12-30 00:00:00 +0000, permissions:(null)>}
Undo
  • 25,519
  • 37
  • 106
  • 129
  • possible duplicate of [The operation couldn’t be completed. (com.facebook.sdk error 2.) ios6](http://stackoverflow.com/questions/15831610/the-operation-couldnt-be-completed-com-facebook-sdk-error-2-ios6) – adamdunson May 14 '14 at 21:22

1 Answers1

0

This are two different errors, for which each you can use Google to find out what could be wrong.

For the first error, it indicates that the user cancelled the login. Do you get this directly after hitting "Login with Facebook"? Can you debug the access token you have? Is it still valid?

For the second error, the key message is 'Invalid application 676311875766710'. Could it be that you try to login with a normal user, whilst the app is in development mode? When your app is in that mode, only Testers, Developers and Admins defined under the "Roles" tab of the App Dashboard can login.

Are you sure the App ID is correct in the plist? Is the App name also correct entered? Is the iOS platform correctly configured in the App Dashboard?

Roemer
  • 3,566
  • 1
  • 16
  • 32
  • I think your response with the normal user in development mode is the issue. So how do I get past this? How can I test my app with a different user other than me? I am using my Facebook account as the developer Facebook account. Do I need to use my account to test on other person's phone? – user3512955 May 11 '14 at 21:27
  • I'll try adding Facebook users to my Roles tab and confirm and answer this question answered! Hope you are right! – user3512955 May 11 '14 at 23:30