PhoneGap 2.1 and Facebook SDK 3.1 on iOS - com.facebook.sdk Error 2 on the device

I just updated the PhoneGap iOS app to the latest version 2.1. Since it uses Facebook login, I also updated Facebook Connect Plugin as shown here .

Logging into Facebook is performed smoothly on the emulator (using both iOS 5.1 and 6.0), but I got an error on the device (using iOS 6) "The operation could not be completed com.facebook.sdk Error 2"

It seems that the problem with the BundleID of my application does not match what the Facebook application has. I checked that the BundleIdentifier and BundleURLName in my info.plist file match the Bundle ID in the Native iOS app in my Facebook app settings.

If someone can help me figure out what's wrong ... Thanks so much.

+7
source share
3 answers

This error can also occur if the application is disabled in the iOS6 settings of Facebook. Go to the "Device Settings" application, check Facebook and see if your application is disabled by setting the "Allow these applications to use your account:" section.

If you find that this is a problem, see SDK 3.1: How to determine if the SDK uses iOS6 accounts or not?

+5
source

I had the same problem. This answer helped me: Facebook ios sdk 3.0 active session FBiOSSDK error2

In short, I tried to log into the FB application with a sandbox with a tester account. Try an administrator account and / or remove the sandbox.

+1
source

This is what worked for me:

  • Remote facebook account in iOS settings
  • left the facebook application and deleted from the iPhone.
  • Recorded from Facebook and the remote application from the iPhone
  • Transfer my application to iPhone

The problem is finally resolved after several days of searching by mistake com.facebook.sdk

My package identifier in the build settings and plist does not match .....

When reinstalling the facebook application and then trying to log in to FB from my application, I received a message telling me to set the identifier of my package in the developers.facebook.com/app file, so maybe this was a problem, but, m not sure since I could login to fb from my application after doing the above steps.

0
source

All Articles