我正在使用这个库https://code.google.com/p/socialauth-android/使用谷歌帐户登录我的应用程序。到目前为止,一切都很好。我可以获取用户名、电子邮件,但可以获取用户个人资料图片。我认为,该库使用 OpenId + Oauth 登录和调用后:
profile.getProfileImageURL()
我得到空值。
我可以通过调用获取令牌和秘密(OpenId?):
socialAuthAdapter.getCurrentProvider().getAccessGrant()
For example:
token key : 1/J0_R-D03mykbqHnnNrVV1lk9FH2j996G05O2WVcHTrQ
token secret : vnh25rzUBVJKjHNpT_USeyjK
但我不能使用它通过使用链接检索用户个人资料网址:https: //www.googleapis.com/oauth2/v1/userinfo
你能给我任何提示,如何使用我从这个库中获得的内容来获取图片 url 吗?
我的 oauth_consumer.properties:
www.google.com.consumer_key = xxxxx.com
www.google.com.consumer_secret = xxxxxxxxxx
www.google.com.custom_permissions = https://www.googleapis.com/auth/userinfo.profile