0
votes

It's weird, but till yesterday i was able to get the gplus user's image in my app but today it's just not coming. Nothing simply blank. And just appears at some time..

I have been using the urls specified in Getting Google+ profile picture url with user_id but these all seem invalid and gives 404 Error.

https://plus.google.com/s2/photos/profile/116018066779980863044?sz=100

If anybody could help me out why this weird behaviour. The Profile pic appears seldom. But mostly it's blank.

2

2 Answers

1
votes

The image URL you were using was never a public API and so there was no guarantee it would continue to work. The recommended practice going forward is to use the people.get API method to get the profile => image => url value instead. That URL could stop working if the user changes their avatar so you might want to fetch the actual image and cache it on your own servers.

0
votes

I think the Image url has been updated.

Inorder to get that, we can use the PlusClient objects methods:

imageURL = mPlusClient.getCurrentPerson().getImage().getUrl()
{Returns a String - Image Url as String}

imageURL = mPlusClient.getCurrentPerson().getImage()
{Returns an instance of Image object}