Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instagram image unsupported size

I have a problem with API call. I would like to get a recent media for an user. I make an API call to following endpoint: https://api.instagram.com/v1/users/1638607411/media/recent?count=100&client_id=MY_CLIENT_ID

The response is:

["images":protected]=>
array(3) {
  ["low_resolution"]=>
  array(3) {
    ["url"]=>
    string(114) "https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/s320x320/e35/11264735_1688306834723686_1802219154_n.jpg"
    ["width"]=>
    int(320)
    ["height"]=>
    int(320)
  }
  ["thumbnail"]=>
  array(3) {
    ["url"]=>
    string(114) "https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/s150x150/e35/11264735_1688306834723686_1802219154_n.jpg"
    ["width"]=>
    int(150)
    ["height"]=>
    int(150)
  }
  ["standard_resolution"]=>
  array(3) {
    ["url"]=>
    string(114) "https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/s612x612/e35/11264735_1688306834723686_1802219154_n.jpg"
    ["width"]=>
    int(612)
    ["height"]=>
    int(612)
  }
}

I want to use „standard_resolution” image, but it is not working. When I want to get it directly, I received Status Code: 404 Unsupported Size

Moreover, when I change "s612x612" in url into "s640x640" - it is working.

Seems like Instagram API bug, I've already reported it, but maybe someone experience something similar?

like image 351
Filip Golonka Avatar asked Aug 17 '15 07:08

Filip Golonka


People also ask

How do I get my whole photo to fit on Instagram?

Open the Instagram app and upload your picture. You'll notice that Instagram crops the picture to square by default, but you can click the expand arrows or pinch the image in the lower left to fit the whole picture on Instagram.

What do you do if Instagram doesn't let your picture fit?

Choose a photo to post and tap the gray Expand icon in the lower-left corner of the preview. Or, pinch your fingers together on the image to zoom out and make it fit.


1 Answers

We noticed this as from Friday August 14 with their realtime API. We did some tests and it seems to be a bug that comes up randomly, only a small subset of responses are wrong, the temporary fix is indeed to replace "s612x612" in the url by "s640x640".

like image 158
Jo Voordeckers Avatar answered Oct 21 '22 03:10

Jo Voordeckers