【发布时间】:2011-05-25 14:05:31
【问题描述】:
验证用户是否已放入 facebook 个人资料图片(即非默认图片)的正确方法是什么,如果是,则检索它?
这个:How to determine if a Facebook user has uploaded a profile picture or its default?讲了一个方法,但是作者自己说是个坏方法:
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);
}
【问题讨论】:
标签: facebook api detect image facebook-fql