How to detect default avatar on the link like this: https://graph.facebook.com/\'.$id.\'/picture?type=large
?
Is it the only way to get avatars (male/female) fr
You can use the redirect=false
parameter:
https://graph.facebook.com/naitik/picture?redirect=false
Then facebook's responce is json
and contains this data:
{
"data": {
"url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn1/157337_5526183_369516251_q.jpg",
"is_silhouette": false
}
}
You can use the is_silhouette
option to detect if the photo is default one.
You can read more at: https://developers.facebook.com/docs/reference/api/using-pictures/