I want to get the users youtube usedID. After successfully login with youTubeService. On the viewController:finishedWithAuth:error: userID returns nil.
Code
- (void)viewController:(GTMOAuth2ViewControllerTouch *)viewController
finishedWithAuth:(GTMOAuth2Authentication *)auth
error:(NSError *)error
{
[viewController dismissViewControllerAnimated:YES completion:NULL];
if(error != nil){
NSLog(@"Authentication error: %@", error);
}
else {
// Authentication succeeded...
NSLog(@"%@",auth.accessToken);
NSLog(@"%@",auth.userID); //returns nil
}
}
Please note that I am not asking Google email ID I want to get youtube user id.