我已经在user_birthday上授予了权限,但我无法获得用户bithday。结果[@" birthday"]返回结果为空,为什么?
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login
logInWithReadPermissions: @[@"public_profile", @"user_birthday"]
fromViewController:self
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
NSLog(@"Process error");
} else if (result.isCancelled) {
NSLog(@"Cancelled");
} else {
NSLog(@"Logged in");
NSLog(@"result==%@", result.grantedPermissions);
}
}];
[[[FBSDKGraphRequest alloc] initWithGraphPath:@"me" parameters:
@{@"fields": @"birthday, name, id, age_range"}]
startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
NSString *birthdaytmp = result[@"birthday"];
NSLog(@"%@", birthdaytmp);
}];