Is there a way to reliably get the size of the largest facebook photo album version?

I request photos of the album using the graphical api explorer.

graph.facebook.com/[album_id]/photos 

The result includes an β€œimage” key, which lists eight versions of the images. The largest list is listed as 2048x1529 , however, when I open the actual image, it is only 604x451 , which are the dimensions indicated for the next largest version.

My application must know the exact size of the image in advance. How can I reliably find the largest image sizes available?

+7
source share
1 answer

Given that the results obtained from ALBUM_ID / photos are not reliable, I believe that the following approach is closest to your intention to get the largest version of the image:

You can get the size of the enlarged image that you see when you click on the photo in the online album. This image is called src_big in the FQL table. You get the dimensions using this FQL query:

 SELECT src_big_width, src_big_height FROM photo WHERE object_id=OBJECT_ID 

where OBJECT_ID is the identification number of the Facebook photo object.

The call is as follows:

 https://graph.facebook.com/fql?q=SELECT src_big_width,src_big_height FROM photo WHERE object_id=OBJECT_ID 

You need

 friends_photos user_photos 

and access token.

To get the src_big image url, add src_big to the request:

 SELECT src_big, src_big_width, src_big_height FROM photo WHERE object_id=OBJECT_ID 

An src_big image has a maximum width or height of 720 pixels if the image was downloaded before March 1, 2012. If it was downloaded after this date, the maximum value is 960 pixels.

+1
source

All Articles