Lets get the source of the photo using photo ID

89 Views Asked by At

I know that I could do something like below and get an array of images

FB.api('/{photo_id}/', function(res) { console.log(res) })

The widest image is just 720px. That's not very good for bigger screen developers and users. Any thoughts on how to get the original uploaded image

For example. Lets refer to the man himself Mar Zuckerberg

  1. Get the cover using api

    FB.api('/4/?fields=cover', function(res) { console.log(res) })

Now as you may see the returned cover is so low resolution and no good. Where as this is the result I'm expecting

https://scontent-lax1-1.xx.fbcdn.net/hphotos-frc3/t31.0-8/c0.93.1434.531/1275272_10101026493146301_791186452_o.jpg

1

There are 1 best solutions below

0
On

Take a look at the images field, this will contain an array of the available sizes, the number and available sizes can vary based on the original size of the image though.

See https://developers.facebook.com/docs/graph-api/reference/photo for more details.