如何确定是否Facebook的用户上传个人资料图片或它的默认? [英] How to determine if a Facebook user has uploaded a profile picture or its default?

查看:115
本文介绍了如何确定是否Facebook的用户上传个人资料图片或它的默认?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法知道,如果用户上传到配置文件的图像或将其通过的 FQL 或其他财产以后?

Is there a way to know if a user uploaded an image to the profile or it has the default user picture of Facebook via FQL or somthing else?

推荐答案

您可以使用下面的Python脚本(如没有提到任何编程语言),使其工作。

You can use the Python script below (as not mentioned any programming language) to make it work.

urllib.urlopen('https://graph.facebook.com/<PROFILE_ID>/picture?access_token=%s' % access_token).geturl()

这将为您的Facebook个人资料照片网址。如果该URL包含&LT; PROFILE_ID>并将其上传的图像。否则默认的Facebook图片上传

This will provide you a Facebook profile photo URL. If that URL contains <PROFILE_ID> then it uploads an image. Else the default Facebook image is uploaded.

例如,如果上传的图片:

For example, if uploaded image:

http://profile.ak.fbcdn.net/hprofile-ak-snc4/195361_<PROFILE_ID>_4179703_q.jpg

其他:

有关男:

http://b.static.ak.fbcdn.net/rsrc.php/v1/yo/r/UlIqmHJn-SK.gif

有关女:

https://fbcdn-profile-a.akamaihd.net/static-ak/rsrc.php/v1/y9/r/IB7NOFmPw2a.gif

我希望这有助于。

I hope this helps.

这篇关于如何确定是否Facebook的用户上传个人资料图片或它的默认?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆