Cannot get permission for user_events facebook

陌路散爱 提交于 2019-12-12 05:57:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!