objective-c facebook login ,loginViewFetchedUserInfo doesn't bring email

274 views Asked by At

well, I'm working in a simple login with objective-c. The problem is that i can't get email property of user variable. It brings me the id and name.

-(void)loginViewFetchedUserInfo:(FBLoginView *)loginView user:(id<FBGraphUser>)user
{
    NSLog(@"%@", user);
    //Todo: It doesn't bring the email.
    self.profilePicture.profileID = user[@"id"];
    self.lblUserName.text = user.name;
    self.lblEMail.text = [user objectForKey:@"email"];
}

Im using logging button and the following snippet:

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.loginButton.readPermissions = @[@"public_profile", @"email"];
    self.loginButton.delegate = self;
}
0

There are 0 answers