Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook Graph API - How do you retrieve the different size photos from an album?
    text
    copied!<p>Ok, first off let me tell you I have no problems getting a user's photo album(s) and looping through the output to display all of the photos in the size I want. </p> <p>However, if I want to call a photo like:</p> <pre><code>&lt;img src="https://graph.facebook.com/&lt;?=$this-&gt;session-&gt;page-&gt;photo_id?&gt;/picture?access_token=&lt;?=$this-&gt;session-&gt;member-&gt;facebook_access_token?&gt;" /&gt; </code></pre> <p>I cannot figure out how to tell it the size I want it to show.</p> <p>In this sample code from Facebook you will see that whey retrieving the album each photo in the array comes back with the different sizes in this sample array. I could just save the thumbnail url from this, but I don't want to store it, just retrieve when needed.</p> <pre><code>{ "id": "10150146071831729", "from": { "name": "Facebook", "category": "Product/service", "id": "20531316728" }, "picture": "http://photos-g.ak.fbcdn.net/hphotos-ak-ash1/168119_10150146071831729_20531316728_7844072_5116892_s.jpg", "source": "http://a7.sphotos.ak.fbcdn.net/hphotos-ak-ash1/168119_10150146071831729_20531316728_7844072_5116892_n.jpg", "height": 483, "width": 720, "images": [ { "height": 483, "width": 720, "source": "http://a7.sphotos.ak.fbcdn.net/hphotos-ak-ash1/168119_10150146071831729_20531316728_7844072_5116892_n.jpg" }, { "height": 120, "width": 180, "source": "http://photos-g.ak.fbcdn.net/hphotos-ak-ash1/168119_10150146071831729_20531316728_7844072_5116892_a.jpg" }, { "height": 87, "width": 130, "source": "http://photos-g.ak.fbcdn.net/hphotos-ak-ash1/168119_10150146071831729_20531316728_7844072_5116892_s.jpg" }, { "height": 50, "width": 75, "source": "http://photos-g.ak.fbcdn.net/hphotos-ak-ash1/168119_10150146071831729_20531316728_7844072_5116892_t.jpg" } ], ....... continued... } </code></pre> <p>There has to be a way to retrieve these different sizes.</p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload