[英]How to identify if Facebook user has Profile Photo or Not using Graph api?
I have implemented Facebook GraphAPi for User Registration in my App.我已经在我的应用程序中实现了用于用户注册的 Facebook GraphAPI。 I am getting all the Required Data Name, email, but unable to get to know that if a user has a profile picture set or not.我得到了所有必需的数据名称、电子邮件,但无法知道用户是否设置了个人资料图片。 I looked for this answer, but unsuccessful.我寻找这个答案,但没有成功。 Unable to find the if it has facebook profile picture or not.无法找到它是否有 Facebook 个人资料图片。
You need to add parameter redirect=false
to get a data structure that will contain the image URL plus a property is_silhouette
, that holds true
for users that do not have a profile picture set, and false
otherwise.您需要添加参数redirect=false
以获取包含图像 URL 和属性is_silhouette
的数据结构,该属性true
于没有设置个人资料图片的用户,否则为false
。
https://developers.facebook.com/docs/graph-api/reference/user/picture https://developers.facebook.com/docs/graph-api/reference/user/picture
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.