I have made a Google login with OAuth2 and the PHP library which can be found on the documentation site.
The scope which I have used is userinfo. I'm getting all the userinfo except the picture. I accessed both the V1 and V2 links with the access token which I received. The links, if I am not mistaken are, -
https://www.googleapis.com/oauth2/v1/userinfo?access_token=<access-token>
https://www.googleapis.com/oauth2/v2/userinfo?access_token=<access-token>
For both of these, the picture info is missing. I receive the following responses-
{
"id": "<some-id>,
"email": "<correct-email-id>",
"verified_email": true,
"name": "Siddharth Saha",
"given_name": "Siddharth",
"family_name": "Saha",
"link": "<google-plus-link>",
"gender": "male",
"locale": "en"
}
Is there some other way to get the picture? Is there a link to the user picture (like in facebook authentication).
From comment: But do you really have a photo on your profile? I think that the "picture" attribute is included only if you have a photo. I follow your "link" and not photo there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With