I'm having some trouble with the Facebook permissions.
Normally I'd use basic_profile
and email
, and this works find on my iPhone. However, when using the simulator, I get an error saying that I should use public_profile
and user_friends
instead of basic_profile
. I changed these, and now it works in the simulator. Switching back to my iPhone creates problems though, as I get an error. It looks like this:
1. An error occurred:
Error Domain=com.facebook.sdk
Code=2 "The operation couldn’t be completed. (com.facebook.sdk error 2.)"
UserInfo=0x170470700 {
com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:SystemLoginCancelled,
com.facebook.sdk:ErrorInnerErrorKey=Error
Domain=com.apple.accounts
Code=7 "The operation couldn’t be completed. (com.apple.accounts error 7.)",
com.facebook.sdk:ErrorSessionKey=<FBSession: 0x17030c330, state:
FBSessionStateClosedLoginFailed,
loginHandler: 0x0,
appID: **appID**,
urlSchemeSuffix: ,
tokenCachingStrategy:<PFFacebookTokenCachingStrategy: 0x178229180>,
expirationDate: (null),
refreshDate: (null),
attemptedRefreshDate: 0001-12-30 00:00:00 +0000,
permissions:(null)>
}
I'm using Parse, and this is how I set up the permissions:
NSArray *permissionsArray = @[@"public_profile", @"user_friends", @"email"];
[PFFacebookUtils logInWithPermissions:permissionsArray block:^(PFUser *user, NSError *error) {
Does anyone know how I can fix this? Any help would be appreciated!
Thanks.