开发者

Google account: Can retrieve the picture from openid? Can I get it with OAuth to google?

开发者 https://www.devze.com 2023-02-01 09:09 出处:网络
I need to retrieve the name, email and picture from a google account. I am already us开发者_StackOverflow社区ing the openid to make the user login with it\'s google acc.

I need to retrieve the name, email and picture from a google account.

I am already us开发者_StackOverflow社区ing 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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消