I want to list photos from flickr account using flickr.photos API using PHP with OAuth.
Right now to get the URLs of the images I am doing it in 2 steps which makes too many requests to the API and takes too much time:
flickr.photos.search
flickr.photos.getInfo
for each photo apart.
[result of flickr.photos.search
] does not return URL of images, but getInfo does.Is there a way to get the images with one single request?
Thanks!
Just go to Settings >Your Flickr Data >Request Flickr Data. When Flickr is done gathering your files, it will send an email letting you know your Zip files are ready for download. It took two days to process 15,000 or so images and videos in 30 Zip files from my Flickr account.
The Flickr API is available for non-commercial use by outside developers. Commercial use is possible by prior arrangement.
After you select that first group of pictures, a box will appear at the bottom of the browser window with a Download button. Click the Download icon, and Flickr will create a compressed . zip file containing all the selected images at their full resolution.
Found the solution, described here: Flickr Image URLs
You can construct the source URL to a photo once you know its ID, server ID, farm ID and secret, as returned by many API methods.
The URL takes the following format:
http://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}.jpg
or
http://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}_[mstzb].jpg
or
http://farm{farm-id}.staticflickr.com/{server-id}/{id}_{o-secret}_o.(jpg|gif|png)
You can find examples and image size prefixes as well on the source page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With