Get high resolution image from Facebook API

The Facebook FQL API for photos indicates the maximum resolution for a photo returned from the API is 960x960:

The Photo object has an equivalent src connection. Using photo_src FQL, you can receive images with the following sizes: 960, 720, 480, 320, 180, 130, 75 pixels.

However, some images are loaded at a higher resolution. Sometimes even much higher.

When browsing Facebook regularly, you can see these photos and view their full size. However, I cannot find a way to get the original resolution in the API.

Is this possible and am I missing something? And if not, why?

+7
source share
1 answer

Getting the maximum image size

/USER_ID?fields=images 

images returns "an array of objects containing width, height, source, each of which represents different sizes of photographs." The result is as follows:

 { "data": [ { "images": [ { "height": 1536, "width": 2048, "source": "https://fbcdn-sphotos-ca.akamaihd.net/hphotos-ak-prn1/s2048x2048/65169_XXXXXX_n.jpg" }, { "height": 720, "width": 960, "source": "https://fbcdn-sphotos-ca.akamaihd.net/hphotos-ak-prn1/65169_44590146XXXXXXXXn.jpg" }, { "height": 540, "width": 720, "source": "https://fbcdn-sphotos-ca.akamaihd.net/hphotos-ak-prn1/s720x720/65169_44XXXXXXX0984540_n.jpg" }, { ... }, { "height": 97, "width": 130, "source": "https://fbcdn-photos-a.akamaihd.net/hphotos-ak-prn1/s75x225/65169_44XXXXX_s.jpg" } ], } ] } 

Getting the maximum size of the profile image

Try over 960, i.e. 961. You will get the maximum image size, if available!

 /USER_ID?fields=picture.height(961) 

Result:

 { "id": "PROFILE_ID", "picture": { "data": { "url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn1/615962_4486XXXXXXXXX3_601495975_o.jpg", "width": 1536, "height": 2048, "is_silhouette": false } } } 
+13
source

All Articles