0

我已经使用 GTM OAuth 2 库成功实现了身份验证。但现在我想拥有用户的电子邮件 ID。我该如何进行。我知道我必须在这里打电话:-

- (void)viewController:(GTMOAuth2ViewControllerTouch *)viewController
  finishedWithAuth:(GTMOAuth2Authentication *)auth
             error:(NSError *)error {
if (error != nil) {

    NSLog(@"SIGN IN ERROR : %@", error.description);
    // Authentication failed
} else {
    // Authentication succeeded
}

}

4

1 回答 1

1

使用 gtm-oauth2 登录 Google 服务时,用户的电子邮件地址在登录 auth 对象的userEmail属性后可用。

于 2012-07-04T00:40:57.873 回答