0

I would like to get the full resolution of the images returned in each child attachment, but I only get one image url.

Here is my call to facebook graph:

$FB_graph_JSON = file_get_contents('https://graph.facebook.com/'.$FB_UserPageID.'/feed?limit=20&fields=from,full_picture,message,picture,child_attachments,object_id&'.$FB_fresh_token);

I can get the full picture for the posting itself, but not from the child attachments, the child picture's size is less then ideal for my application.

Is there a way to get the full resolution image back for the child ?

iewebguy
  • 316
  • 3
  • 16

2 Answers2

0

Take a look at the picture values inside the child attachments. They are in such a format:

https://external.xx.fbcdn.net/safe_image.php?d=xxx&url=http%3A%2F%2Fwww.example.com.tw%2Fsites%2Fdefault%2Fmy.jpg

The URL parameter is exactly what you want.

You just need to extract the url parameter and perform a URI component decode on it, then you will get the full resolution image for that child.

Joe Huang
  • 6,296
  • 7
  • 48
  • 81
0

Add attachments field and found your images in full resolution in [subattachments] node

$FB_graph_JSON = file_get_contents('https://graph.facebook.com/'.$FB_UserPageID.'/feed?limit=20&fields=from,full_picture,message,picture,attachments,child_attachments,object_id&'.$FB_fresh_token);