Do the Google+ profile picture URLs returned by the Google API change?

允我心安 提交于 2019-12-23 07:41:30

问题


So, I'm using the Google API to fetch people's profile picture using their user_id. The Google API returns a JSON like following:

{
    image: {
        url: "https://lh5.googleusercontent.com/OGjgCn9fCPk/AAAAAAAAAAI/AAAAAAAAASU/AitRTc5cUyg/photo.jpg?sz=50",
        isDefault: false
    }
}

My question is, does this URL change? I mean will it change if the user changes their profile picture or if some CDN restructuring occurs.

Do I need to fetch it every time? Or can I just save and use it forever?

If not is their some time period for which I can save, use it directly and refresh after that time elapses?

UPDATE:

So, if we change the profile picture, the URL does change. And both the old URL and the new URL point to the same new profile picture for now.

Is there any timeout or anything after which Google will invalidate the old URL? Or will both of them continue pointing to the changed picture (and any future changes) indefinitely?

来源:https://stackoverflow.com/questions/42241699/do-the-google-profile-picture-urls-returned-by-the-google-api-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!