iOS Google OAuth,检索 friend 的电子邮件地址

标签 ios google-plus google-plus-signin

我正在尝试使用

从我的 iOS 应用程序中获取已登录用户 friend 的电子邮件地址
    [GTLQueryPlus queryForPeopleListWithUserId:@"me"
                               collection:kGTLPlusCollectionVisible];//kGTLPlusCollectionVisible

我已经按照 Google Docu 中的描述设置了身份验证范围:

    signIn.scopes = @[
                   kGTLAuthScopePlusLogin,
                   kGTLAuthScopePlusMe,
                   kGTLAuthScopePlusUserinfoEmail,
                   kGTLAuthScopePlusUserinfoProfile,
                   @"email",
                   @"https://www.googleapis.com/auth/plus.profile.emails.read",
                   @"https://www.googleapis.com/auth/plus.circles.read"
                   ];

结果是,我得到了 friend 列表,但没有电子邮件地址。由于我没有收到任何错误消息,我真的卡住了,没有解决方案

有人可以帮忙吗?

谢谢。

帕特里克

最佳答案

电子邮件范围仅适用于当前经过身份验证的用户配置文件。他们不允许访问其他个人资料的电子邮件地址。

关于iOS Google OAuth,检索 friend 的电子邮件地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30012979/

相关文章:

java - 流程应用程序执行失败 :dexDebug after adding BaseGameUtils

ios - Google Plus 登录不适用于 iOS 7

ios - 在tableview中需要3个静态标签作为标题和许多动态标签

ios - 卡在为 MoonAPNS 创建 p12 文件

iphone - 验证文本字段 : highlighted red border, iPhone

ios - 缩放 CGPath 以适应 UIVIew

google-plus - 如何根据 google plus id 找到电子邮件?

javascript - 谷歌登录: Disable automatic authentication

android - Google plus 看起来像谷歌登录按钮 android

android - 无法使用 SmartLock 保存 IdentityProviders.GOOGLE 凭据