2014-03-13 37 views
0

这很奇怪,但直到昨天,我才能在我的应用中获得gplus用户的图像,但今天它只是不来。什么都不是空白。并在一段时间出现..无法获取GPlus个人资料图片。 Google Plus图片抓取网址是否已更新?

我一直在使用Getting Google+ profile picture url with user_id指定的网址,但这些都似乎无效,并给出404错误

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

如果有人可以帮助我为什么这种怪异的行为。个人资料图片很少出现。但大部分是空白的。

回答

1

你正在使用的图像URL从来就不是一个公共的API,因此无法保证它会继续工作。今后推荐的做法是使用API​​方法来取代profile =>image =>url值。如果用户更改其头像,那么该网址可能会停止工作,因此您可能需要获取实际图片并将其缓存到自己的服务器上。

+0

谢谢@abraham ... – Kailas

0

我认为图片网址已被更新。

中序得到的是,我们可以使用PlusClient对象的方法:

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

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