Reputation: 168
I'm trying to extract a picture from a post on my page, but I only seem to get it in a small/normal size, and I need it to be large.
I've tried:
$facebook->api('/' . FACEBOOK_PAGE_ID . '/feed?fields=picture,type,link');
And:
$facebook->api('/' . PICTURE_OBJECT_ID . '/?type=large');
But these both return this, even though it exists much larger: https://scontent.xx.fbcdn.net/hphotos-xpa1/v/t1.0-9/p130x130/10425079_783550735069408_4518815346697887155_n.jpg?oh=c72ed199f78f7627b6b78f8eb0da8108&oe=55735F64
How do I get it out as a large picture?
Upvotes: 0
Views: 1986
Reputation: 178
Sure that there is a better way to do this, but this one works at the moment.
Get the URL part between the two "_", that is the Facebook ID. In your example "783550735069408".
Now build a new URL like this:
"https://graph.facebook.com/" + FacebookID + "/picture?width=320&height=320"
In this example you get a 320x320 image, if you what anyelse size you must to change the width and height params.
I wish it helps!
Upvotes: 1
Reputation: 61
Take a look at this post
Facebook Graph API Change: Picture type (size) no longer working?
but it actually looks like taht this is the regular size of this image.
Upvotes: 0