Flickr feed problems. how to show all images from a photostream
Asked Answered
D

2

5

I am using a bespoke JQuery/PHP script which parses a Flickr feed using SimpliePie and outputs an image gallery.

I have instructed my client to upload there images into their flickr account.

The images are showing but the feed seems to be limiting to 20 images, however, there are 40 images in the stream.

I have checked the API and there doesn't seem to be any paramaters to change this.

Has anyone come across this before, can anyone help me tweak the feed so that it pulls all the images in the photostream?

Here is the Flickr Stream and feed...

http://www.flickr.com/photos/44280289@N04/

http://api.flickr.com/services/feeds/photos_public.gne?id=44280289@N04&lang=en-us&format=rss_200

Disinfectant answered 9/11, 2009 at 12:23 Comment(0)
I
4

It appears that they do limit it to the initial 20 photos on flickr

http://www.flickr.com/help/website/

Why do I only see 20 items in RSS feeds?

Flickr only shows the latest 20 items in a feed. Because of this, the first time you connect to a feed you will only see the most recent items. But if your RSS reader saves items (as most do) you will see more than 20 as the items build up over time.

But you could potentially use the flickr api, particularly http://www.flickr.com/services/api/flickr.photosets.getPhotos.html

Which allows you to get more (You will need to get an API key however)


Edit:

Though I have not personally used it I have read/heard good things about http://phpflickr.com/ which is a flickr api wrapper for php 4 and 5


Edit 2: Unfortunately I can not comment on your comment but if you take a look at this link from the flickr code blog

http://code.flickr.com/blog/2008/08/25/api-responses-as-feeds/

Some API responses can been provided as feeds so you could try using "&format=feed-rss_200" not sure if it includes getPhotos yet though.

Inexpiable answered 9/11, 2009 at 12:48 Comment(3)
nope that didnt work :( How else could I approach this?. What gallery do you use which is easy to implement on a Static webpage which the user can update themselves?Disinfectant
I personally have only used "Gallery" at gallery.menalto.com but that might be way too much for your needs. If you are comfortable tinkering with the flickr API you could potentially try and build an rss feed from the JSON results provided and feed that into SimplePie? Or skip SimplePie all together and work with the JSON result instead.Inexpiable
RSS feed in JSON + jQuery = Easiest method to show on website.Targe
T
4

It seems like you want to use the photosets.getPhotos api call. It will give you a maximum of 500 photos.

Here is an example which gives you the url of the photo in url_o

http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&extras=url_o&photoset_id=72157622766901612&api_key=[YOUR APIKEY HERE]

You need an api key to make it work.

You can also get the output as JSON directly by adding &format=json to the url.

Toliver answered 9/11, 2009 at 12:44 Comment(3)
thankyou for your prompt reply adamse i'll give it a whirl now!Disinfectant
The way the gallery is setup it looks for an rss feed using Simple Pie, I went and got an API key and tried the url you suggested. All the pics appear but when i append &format=RSS_200 to the url I get the following error - msg="Format "rss_200" not found". How can I get the get photos call to parse an RSS feed?Disinfectant
Why don't you make it easy on yourself and use JSON (or something else) instead. PHP has a built in JSON parser (php.net/manual/en/function.json-decode.php)Toliver
I
4

It appears that they do limit it to the initial 20 photos on flickr

http://www.flickr.com/help/website/

Why do I only see 20 items in RSS feeds?

Flickr only shows the latest 20 items in a feed. Because of this, the first time you connect to a feed you will only see the most recent items. But if your RSS reader saves items (as most do) you will see more than 20 as the items build up over time.

But you could potentially use the flickr api, particularly http://www.flickr.com/services/api/flickr.photosets.getPhotos.html

Which allows you to get more (You will need to get an API key however)


Edit:

Though I have not personally used it I have read/heard good things about http://phpflickr.com/ which is a flickr api wrapper for php 4 and 5


Edit 2: Unfortunately I can not comment on your comment but if you take a look at this link from the flickr code blog

http://code.flickr.com/blog/2008/08/25/api-responses-as-feeds/

Some API responses can been provided as feeds so you could try using "&format=feed-rss_200" not sure if it includes getPhotos yet though.

Inexpiable answered 9/11, 2009 at 12:48 Comment(3)
nope that didnt work :( How else could I approach this?. What gallery do you use which is easy to implement on a Static webpage which the user can update themselves?Disinfectant
I personally have only used "Gallery" at gallery.menalto.com but that might be way too much for your needs. If you are comfortable tinkering with the flickr API you could potentially try and build an rss feed from the JSON results provided and feed that into SimplePie? Or skip SimplePie all together and work with the JSON result instead.Inexpiable
RSS feed in JSON + jQuery = Easiest method to show on website.Targe

© 2022 - 2024 — McMap. All rights reserved.