문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top