Com.Facebook.Sdk Error 2 on iOS

com.facebook.sdk error 2 on iOS

Turns out: a com.facebook.sdk error 2 can translate into a number of things. I'm looking for some kind of Facebook SDK error translation table, but I'm unable to find one. In my case:
The com.facebook.sdk error 2 happened because the connection timed out. Users who got this error had a bad network/WiFi connection.

We implemented an error logging system, which logged the error details every time an error happened while logging into Facebook. In those logs we could see a com.facebook.sdk error 2 happening quite a lot, but it being resolved every time the user tried to log in again after a few seconds.

It might be due to my inability to find the right documentation, but I was and still am quite frustrated about the vagueness of these SDK errors. There is a lot of documentation about permission asking (which can result into the com.facebook.sdk error 2), but apparently this error can be caused by more things. It would be nice to see this documented somewhere as well.

Facebook SDK error 2 from iOS`

Configure the plist from the guide facebook has here https://developers.facebook.com/docs/ios/getting-started/

It should work if you have the plist and an app on the facebook developer profile with iOS enabled

com.facebook.sdk error 2 occurs when login to Facebook

I had the same error and finally solved it. The app was configured on Sandbox mode and the facebook user I was using wasn't added to testers group.

An administrator can solve it here: https://developers.facebook.com/apps

Facebook SDK iOS error 2

check that your permissions array does not contain the offline_access permission. this permission is now deprecated and has been known to cause login to fail. i previously searched stack overflow and found this answer. you'll also need to go into Settings -> Facebook and switch the permission on the Allowed Apps to On.

iOS Facebook SDK Error Domain com.facebook.sdk Code 2 and Code 7

Yes, after you see this error, if you go to Settings, you will see that the setting for this app is turned "OFF". But the problem in this case is that the user was never prompted to allow access -- i.e. the setting was turned to OFF automatically on first time access. If the user was asked, then of course that is understandable, but this is not the case (it's as if the SDK silently and automatically pressed Don't Allow for the user). That's why this is a problem.

Before you read any further, I want to note that once the setting is set, you cannot simply repeat the process to test it, because once the setting is set, it will never ask the user (even deleting and reinstalling the app does not help). To test this issue, you need to reset the permissions by going to Settings -> General -> Reset -> Reset Location & Privacy, before you can try to replicate this again.

From testing, I've discovered that if you have offline_access in the permissions you are requesting for the first time, then it will give this login error (and not prompt the user and set the permission to OFF). The SDK does not check and tell you that this permission is not allowed; it just fails to login.



Related Topics



Leave a reply



Submit