测试用户是否发布了Facebook个人资料图片,如果是,则进行检索?
|
验证用户是否已放入Facebook个人资料图片(即非默认图片)的正确方法是什么(如果是,则进行检索)?
这:如何确定Facebook用户是否上传了个人资料图片或其默认图片?谈论一种方法,但是作者本人说这是一种不好的方法:
public static function hasProfilePicture($fbuid)
{
/* Really stupid method to test if Facebook user has real profile picture
* based on FB returning a gif when you request a large photo.
* Use with care - for every profile there\'s an outgoing request! */
$r = get_headers(\"http://graph.facebook.com/$fbuid/picture?type=square\");
return !array_search(\"Content-Type: image/gif\",$r);
}
没有找到相关结果
已邀请:
1 个回复
碉罕城爸