I am able to access Google user's email, display name, and profile picture but while accessing the about me and birthday I get nil.
Is there any special permission required?
I am using below code on IBAction
- (IBAction)loginUsingGoogle:(id)sender {
[GPPSignInButton class];
GPPSignIn *signIn = [GPPSignIn sharedInstance];
signIn.shouldFetchGooglePlusUser = YES;
signIn.shouldFetchGoogleUserEmail = YES;
signIn.scopes = @[kGTLAuthScopePlusLogin];
signIn.scopes = @[ @"profile" ];
signIn.scopes = @[kGTLAuthScopePlusMe];
signIn.delegate = self;
NSLog(@"Google Button clicked");
[[GPPSignIn sharedInstance] authenticate];
}
I am using above code to hit the google api but unable to extract birthday and about me info, I am using below way to extarct user detail but birthday gives a nil value.
GTLPlusPerson *per = [GPPSignIn sharedInstance].googlePlusUser;
GTMOAuth2Authentication *authentication = [GPPSignIn sharedInstance].authentication;
self.nameTexField.text = per.name.givenName;
self.birthDayTextField.text = per.birthday;//
self.emailIdTextField.text = authentication.userEmail;