4

I am trying to get a high resolution photo from the post below in my news feed. I tried calling https://graph.facebook.com/v2.1/10154603506630195 using the object_id based on advice here (getting high resolution photos that were posted on a page wall/feed) but it doesn't seem to work, any help would be much appreciated :)

{
  "id": "10154603665915195_10154603509055195", 
  "from": {
    "id": "10154603665915195", 
    "name": "John Smith"
  }, 
  "message": "I've taken up queuing as a new hobby during my short time in England. Here we are outside a store that won't open for another half hour...", 
  "picture": "https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpf1/v/t34.0-12/s130x130/10699259_10154603507605195_419931109_n.jpg?oh=ff3ec0e772fea164bbd9d61e9ee9a4d0&oe=540E80D2&__gda__=1410242521_d3b2dc1c8f971610b07e0408cd62815b", 
  "link": "https://www.facebook.com/photo.php?fbid=10154603506630195&set=a.10150303996795195.555860.698310194&type=1&relevant_count=1", 
  "icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yx/r/og8V99JVf8G.gif", 
  "actions": [
    {
      "name": "Comment", 
      "link": "https://www.facebook.com/10154603665915195/posts/10154603509055195"
    }, 
    {
      "name": "Like", 
      "link": "https://www.facebook.com/10154603665915195/posts/10154603509055195"
    }
  ], 
  "privacy": {
    "value": ""
  }, 
  "type": "photo", 
  "status_type": "added_photos", 
  "object_id": "10154603506630195", 
  "application": {
    "name": "Facebook for iPhone", 
    "namespace": "fbiphone", 
    "id": "6628568379"
  }, 
  "created_time": "2014-09-07T10:40:03+0000", 
  "updated_time": "2014-09-07T10:40:03+0000", 
  "likes": {
    "data": [
      {
        "id": "711243852300920", 
        "name": "Megumi Yoshida Atobe"
      }, 
      {
        "id": "10152707756462594", 
        "name": "Emily Stokes-Rees"
      }, 
      {
        "id": "10152741507272044", 
        "name": "Lina Kumamaru Sato"
      }
    ], 
    "paging": {
      "cursors": {
        "after": "MTAxNTI3NDE1MDcyNzIwNDQ=", 
        "before": "NzExMjQzODUyMzAwOTIw"
      }
    }
  }
}
Community
  • 1
  • 1
supster
  • 175
  • 1
  • 7
  • So what exactly is the problem. "not working" is not very specific! – Tobi Sep 08 '14 at 07:25
  • 1
    I've had this question too. the "not working" is related to the news query only returning low resolution images which are so blurry that they are virtually useless. How do you force facebook to return various resolutions of the "picture" icon? Did you ever find an answer to this? – Mike Baglio Jr. Sep 25 '14 at 18:11
  • @user3948881: Have you got the solution ? – Vineesh TP Oct 20 '14 at 08:24
  • Seems to be an issues with tokens and not having permissions to access these pictures, but I'm not 100% sure, so don't have a good solution yet. It seems weird because I can access the same pics in highres on my computer's news feed but the API wont let me – supster Oct 21 '14 at 14:23
  • This answer might also be helpful for those accessing posts from a "Page", not just a user: https://stackoverflow.com/a/45815563/195835 – Simon East Jan 13 '23 at 16:16

2 Answers2

3

If you are using the FB Graph API, ask for the full_picture field in your request:

FB.api('10153224297552834_10153268631032834?fields=full_picture', function (response) { 
    console.log(response.full_picture);
});
dutzi
  • 1,880
  • 1
  • 18
  • 23
  • When accessing a Facebook Page's feed, `full_picture` only gives me a 720px wide image, not the full resolution one. And this only works for posts with a single image. If there are multiple images you need to look in `attachments`. – Simon East Jan 13 '23 at 14:47
2

Try specifying the attachments field in your request.

/v2.2/<someId>/feed?fields=attachments

This will give you an 'attachments' field, with some media inside. You'll find there high res images.

ecdeveloper
  • 2,777
  • 1
  • 22
  • 16
  • When accessing a Facebook Page's feed, `attachments` seems to only provide a 720px wide image, not the full resolution one. Not sure of the solution to that yet. – Simon East Jan 13 '23 at 14:49