Facebook SDK 3.0: how to receive user's e-mail?

前端 未结 5 1944
执笔经年
执笔经年 2020-12-04 20:07

In the \"old\" FB iOS SDK I could receive user information via the following:

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys         


        
5条回答
  •  忘掉有多难
    2020-12-04 20:24

    from this we can get facebook user's basic info and email id.

    [FBSession openActiveSessionWithReadPermissions:@[@"basic_info",@"email"] allowLoginUI:YES completionHandler:^(FBSession *session,FBSessionState status,NSError *error){
            if(error)
            {
                NSLog(@"Facebook Error : %@",error.localizedDescription);
            }
            else{
    
            }
            // Respond to session state changes,
            // ex: updating the view
    
        }];
    

提交回复
热议问题