问题
I am trying to get all the events that user has created for that i am trying to request permission for accessing the user_events.
However thus far facebook is not asking user for permission to access events. I have checked the test user app permission profile and my app is only getting profile info but not events settings.
The facebook sdk i am using is 3.19
if ([FBSession.activeSession.permissions indexOfObject:@"user_events"]==NSNotFound) {
[FBSession.activeSession requestNewReadPermissions:@[@"user_events"] completionHandler:^(FBSession *session, NSError *error) {
if (!error) {
action();
}
else if (error.fberrorCategory != FBErrorCategoryUserCancelled)
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Permission denied"
message:@"Unable to get permission to post"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
}];
}
else
{
action();
}
回答1:
user_events
needs to get approved by Facebook before it works with any user, else it will only work for users with a role in your app: https://developers.facebook.com/docs/apps/review/login
来源:https://stackoverflow.com/questions/27105247/cannot-get-permission-for-user-events-facebook