简体   繁体   中英

Images of Custom Height Width - Facebook Graph API (Albums/photos)

I am trying to pull out images from my album on facebook using Graph API and I am able to do so.

using the call - graph.facebook.com/albumID/photos

above call responds with all the data I need and it responds with URL of all the images in various sizes:

 {
      "picture": "URL Here",
      "source": "URL Here",
      "height": 540,
      "width": 720,
      "images": [
        {
          "height": 972,
          "width": 1296,
          "source": "URL Here"
        },
        {
          "height": 720,
          "width": 960,
          "source": "URL Here"
        },
        {
          "height": 540,
          "width": 720,
          "source": "URL Here"
        },
        {
          "height": 450,
          "width": 600,
          "source": "URL Here"
        },
        {
          "height": 360,
          "width": 480,
          "source": "URL Here"
        },
        {
          "height": 240,
          "width": 320,
          "source": "URL Here"
        },
        {
          "height": 135,
          "width": 180,
          "source": "URL Here"
        },
        {
          "height": 97,
          "width": 130,
          "source": "URL Here"
        },
        {
          "height": 97,
          "width": 130,
          "source": "URL Here"
        }
      ],

Is there a way using which I can get images that are there in my albums, of the size I want? Eg: 150x120 or 190x210 etc.

Thanks, Reno Jones

Is there a way using which I can get images that are there in my albums, of the size I want? Eg: 150x120 or 190x210 etc.

No , this is not possible. You have to use one of the photos supplied by Facebook.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM