答案 0 :(得分:1)
您应该以这种方式收到电子邮件:
[user objectForKey:@"email"]//Where user is FBGraphUser type
以下是登录成功时的实施
case FBSessionStateOpen: {
NSLog(@"accessToken: %@", session.accessTokenData.accessToken);
[[FBRequest requestForMe] startWithCompletionHandler:
^(FBRequestConnection *connection,
NSDictionary<FBGraphUser> *user,
NSError *error) {
if (error) {
//error
}else{
NSLog(@"%@, %@",[user objectForKey:@"email"], user.description);
}
}];
}
break;
答案 1 :(得分:0)
试试这个:
facebook = [[Facebook alloc] initWithAppId:[self _APP_KEY] andDelegate:self];
[facebook authorize:[NSArray arrayWithObjects:@"email",nil]];