Google帐户:可以从openid检索图片吗?我可以通过 OAuth 获取它吗?

发布于 2024-10-09 01:10:30 字数 473 浏览 0 评论 0原文

我需要从 Google 帐户检索姓名、电子邮件和图片。
我已经在使用 openid 来让用户使用 google acc 登录。

我可以从 openid 进程中获得图片 URL 吗?

使用 OAuth 我似乎无法找到检索此信息的正确范围...请参阅此链接:
http://code.google.com/apis/gdata/docs/directory.html

有一个范围列表,您可以使用 REST api 获取到 google,但我没有看到与配置文件相关的范围。

顺便说一句,我正在使用 PHP,openid 已经可以工作,但直到我知道我是否可以(并且需要)检索图片时才开始使用 oauth(因为电子邮件和姓名已经包含在 openid 进程中)

谢谢,

I need to retrieve the name, email and picture from a google account.
I am already using the openid to make the user login with it's google acc.

Can I have the picture URL from the openid proccess?

with OAuth I cant'seem to find the right scope to retrieve this information... See this link:
http://code.google.com/apis/gdata/docs/directory.html

there is a list of scopes that you can fetch with REST api to google and I didnt't see the one related to the profile.

Btw, I am using PHP and the openid is already working, but didn't start with the oauth untill I know if I can(and need) retrieve the picture (because email and name already comes within the openid proccess)

thanks,
Joe

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

命比纸薄 2024-10-16 01:10:30

看来您可以使用 Google Contacts Data API 检索图片网址:请参阅 http://code.google.com/intl/fr/apis/contacts/docs/3.0/developers_guide_protocol.html#retriving_photo

然后,您必须使用 OAuth 验证您的请求。如果您已使用 OpenID,现在可以使用混合协议 OpenId/OAuth :请参阅 http://code.google.com/intl/fr/apis/accounts/docs/OpenID.html#oauth

It seems that you can retrieve the picture URL with the Google Contacts Data API : see http://code.google.com/intl/fr/apis/contacts/docs/3.0/developers_guide_protocol.html#retrieving_photo

Then you must authenticate your requests with OAuth. If you already use OpenID, you can now use the hybid protocol OpenId/OAuth : see http://code.google.com/intl/fr/apis/accounts/docs/OpenID.html#oauth

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文