1
什麼是正確驗證用戶是否已放入Facebook個人資料圖片(即非默認的圖片)的方法,如果是,檢索它?測試用戶是否發佈了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);
}