0

I am running the newest Parse and FB SDKs (downloaded today: Dec 4, 2015). Xcode: 7.1 iOS 9.0

If I use the Facebook login button it works fine, but I'd like to use the parse login integration. I get an error right when this method is called. I think that Parse is calling a Facebook method that has been changed, and this might be the issue.

Error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:]: unrecognized selector sent to instance 0x7fa5727143e0'

let permissions = ["public_profile", "email", "user_friends"]

PFFacebookUtils.logInInBackgroundWithReadPermissions(permissions) { (user: PFUser?, error: NSError?) -> Void in

    if let user = user {
        if user.isNew {
            print("User signedUp with Facebook!")
        } else {
            print("User logged in through Facebook!")
        }
    } else {
        print("Facebook login FAILED")
    }

}
Michael Sacks
  • 917
  • 1
  • 11
  • 17

1 Answers1

1

The method -[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:] seems to have been added in version 4.6 of the Facebook iOS SDK. It sounds like the version of the Facebook SDK you're using is older than that, and older than the one the Parse SDK expects to be used with. Make sure you're actually using the latest version of both SDKs.

Andrew Madsen
  • 21,309
  • 5
  • 56
  • 97