本文介绍了如何检查谷歌用户的图片是默认的还是上传的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检查用户的个人资料图片是默认的还是在 Google 中上传的?

How do I check whether user's profile picture is default or uploaded in Google?

注意:当您从 API 获取用户详细信息时.

Note: When you get user details from APIs.

推荐答案

所有默认头像都有以下网址:

All of default profile pictures have the following URL:

https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg

您可以将个人资料图片的字符串相等性与给定的相比较.

You can just compare string equality of profile picture with the given one.

这篇关于如何检查谷歌用户的图片是默认的还是上传的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-01 11:35