有谁知道如何通过 Google OAuth api 检索 D.O.B?我可以通过将范围设置为来获取其他信息,例如姓名、电子邮件、性别https://www.googleapis.com/auth/userinfo.profile。但我无法用这个范围获得 D.O.B。
我肯定会从我的帐户中得到它:
{
"id": "108635752367054807758",
"name": "Nicolas Garnier",
"given_name": "Nicolas",
"family_name": "Garnier",
"link": "https://plus.google.com/108635752367054807758",
"picture": "https://lh4.googleusercontent.com/-K1xGP8W20xk/AAAAAAAAAAI/AAAAAAAABhY/Cs_4qr30MxI/photo.jpg",
"gender": "male",
"birthday": "0000-08-25",
"locale": "en"
}
我所做的只是授权https://www.googleapis.com/auth/userinfo.profile范围,然后发送 GET 请求到https://www.googleapis.com/oauth2/v2/userinfo
首先确保您正在测试的 Google+ 帐户已设置生日(当然),然后在 OAuth 2.0 Playground 上尝试请求,例如:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)