iOS requestAccessToAccountsWithType is Not Showing Permission Prompt / NSAlert

前端 未结 2 1589
忘掉有多难
忘掉有多难 2021-01-19 17:27

It is my understanding that when I invoke [ACAccountStore requestAccessToAccountsWithType:options:completion], the user is supposed to see an UIAlert that asks

2条回答
  •  太阳男子
    2021-01-19 17:49

    You are actually missing a key: ACFacebookAudienceKey. You can change it like that:

    NSDictionary *options = [[NSDictionary alloc] initWithObjectsAndKeys:
                                     (NSString *)ACFacebookAppIdKey, @"##########",  
                                     (NSString *)ACFacebookPermissionsKey, [NSArray arrayWithObject:@"email"],
                                     (NSString *)ACFacebookAudienceKey, ACFacebookAudienceEveryone,
                                     nil];
    

    By the way, when you are using Twitter, the options must be nil.

提交回复
热议问题