What I have and what're problems occurred:
Invalid flow:
If I use App ID/API Key from first application, I open my application and trying to login. Facebook SDK opens native FB application and show me that screen
I press OK and go back to my iOS with such error and without access token:
(NSError *) $0 = 0x001710f0 Error Domain=com.facebook.sdk Code=2 "The operation couldn’t be completed. (com.facebook.sdk error 2.)" UserInfo=0x16d4b0 {com.facebook.sdk:ErrorLoginFailedOriginalErrorCode=210}
Valid flow:
If I use App ID/API Key from second (test) application, I open my application and trying to login. Facebook SDK opens native FB application and show me that screen
I press OK and go back to my iOS with valid access token.
Settings of applications are the same, I didn't see any differences. This problem occurred if I have native Facebook application. If I haven't it, Facebook SDK opens browser and authorization will be successful with first and second App ID.
If someone had such problem, please help. Thanks a lot.
I solved the issue.
Actually after changing here and there I found my bundle id was not matching. I have kept the bundle id same in the following 3 places and it worked:
NSString *const FBSessionStateChangedNotification = @"yourbundleid:FBSessionStateChangedNotification";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With