Search code examples
phpflickr

Flickr API: How to get URL for sharing each photo in Set


In my local webserver, I'm trying to generate the text for pasting to my blog, followed by below question: How to get static image url from flickr URL?

<a href="http://www.flickr.com/photos/53067560@N00/2658147888/" title="Chou fleurs by Nicolas de Fontenay, on Flickr">[<img src="https://i.sstatic.net/VC7Ng.jpg" width="500" height="375" alt="Chou fleurs">][1]

I think it's good to use some API function and to designate $variables to:

, but don't know how to code in detail. Ideally, a function

getFlickrImageURLforGrab(name of Set, # of photos)

ex.) getFlickrImageURLforGrab(myset1, 10) returns first 10 photo's URLs in the Set myset1 are displayed. Would you please show a simple php example?


Solution

  • The answers in the question you link to refer to flickr.photos.getSizes. You also will want to look at the doc for flickr.photosets.getPhotos.

    I don't use PHP with Flickr's API, but a search turns up phpFlickr, which might help you with some of the heavy lifting.