Reputation: 37
Is there a way to get the profile picture for a google+ account by using an URL ?
I know that we can get the photo by doing something like: https://plus.google.com/s2/photos/profile/1234567890?sz=200 and I need something similar to get the profile cover photo.
Upvotes: 1
Views: 1705
Reputation: 8681
It depends on the URL you have, if you have the user's Google+ ID, you can then retrieve their profile, which contains a link to their profile. An example:
Api Explorer Demo of Retrieving a Cover Photo
Set the fields value to cover/coverPhoto/url
if it's not getting added automatically.
Upvotes: 3
Reputation: 2176
There is not a link to access profile photos through the Google+ API. The best way to do this would be to make a GET request to the people.get
API endpoint, as follows:
GET https://www.googleapis.com/plus/v1/people/{userId}
That will return a Person
resource, which will contain the user's profile image under the id image
.
Upvotes: 3