Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

The Facebook login runs 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 couldn't be completed com.facebook.sdk Error 2"

It seems to be a problem with the BundleID of my app not matching the one on the Facebook app. I checked that BundleIdentifier and BundleURLName in my info.plist file match the Bundle ID under Native iOS app in the settings of my Facebook app.

If someone could help me understand what's wrong... Thanks a lot.

like image 927
dfucci Avatar asked Oct 07 '12 06:10

dfucci


People also ask

What is Facebook SDK for IOS?

The Facebook SDK enables: Facebook Login - Authenticate people with their Facebook credentials. Share and Send dialogs - Enable sharing content from your app to Facebook. App Events - Log events in your application.


1 Answers

This error could also happen if the app has been turned off on the Facebook iOS6 settings. Go to the device Settings app, check Facebook and see if your app is turned off, by checking the "Allow These Apps to Use Your Account:" section.

For a related discussion, if you find this to be the issue, see SDK 3.1: How to tell whether SDK is using iOS6 accounts or not?

like image 127
C Abernathy Avatar answered Oct 20 '22 08:10

C Abernathy