What is the best way to get ALL profile pictures from a given user? What permissions do I need?
I know I can access the main profile pic using https://graph.fa
To get all profile pictures, firstly you need to get list of all albums, but if count of albums more than 24 you will not get the rest and you probably will not get profile photos album. For this you need to pass limit=0 to get albums URL.
Here is example code:
$tokenUrl = "https://graph.facebook.com/oauth/access_token?client_id=$yourAppId&redirect_uri=$yourRedirectUrl
&client_secret=$yourAppSecret&code={$_GET["code"]}";
$accessToken = file_get_contents($tokenUrl);
$extAlbumUrl = "https://graph.facebook.com/me/albums?$accessToken&limit=0";
$albums = json_decode(file_get_contents($extAlbumUrl));