I am trying to use the Parse user login using Facebook. Each time logInWithPermissions is used, permissions are zero. The following code always produces the same output:
[PFFacebookUtils logInWithPermissions:[NSArray arrayWithObject:@"email"] block:^(PFUser *user, NSError *error) { NSLog(@"Initial login permissions: %@", [[PFFacebookUtils session] permissions]); [PFFacebookUtils reauthorizeUser:[PFUser currentUser] withPublishPermissions:[NSArray arrayWithObject:@"publish_actions"] audience:FBSessionDefaultAudienceEveryone block:^(BOOL succeeded, NSError *error) { NSLog(@"Post request login permissions: %@", [[PFFacebookUtils session] permissions]); [PFUser logOut]; }]; }];
Output:
app2[6966:907] Initial login permissions: (null) app2[6966:907] Post request login permissions: ( "user_location", installed, "user_birthday", email, "publish_actions" )
Why are the initial permissions always zero? Shouldn't these permissions persist between sessions? Right now, every time a user logs out and then logs in again, the application is requesting the same rights that had already been granted to the application earlier.
Another weird thing: logInWithPermissions: the block uses the default iOS6 dialog integrated with iOS, while reauthorizeUser: withPublishPermissions: audience: the block switches the user to the Facebook application.
I use the following versions of the SDK:
- Parse.com version 1.2.7
- Facebook SDK version 3.5.1
And, of course, the question, as was said earlier: Why are the initial permissions always zero? Shouldn't these permissions persist between sessions?
source share