Flickr RSS Hacks

Flickr RSS's support is slightly uneven. The first problem (which appears intractable) is that the RSS feed for pictures from your contacts is not the same content as the web page. The RSS feeds don't show you anything marked as "only for family" or "only for friends". The short form is that you aren't logged into Flickr, so you don't get to see anything locked, just public stuff. Fair enough, but I wish they supported something like the LiveJournal trick I discussed here to allow your RSS reader to login and pull the full list.

 

Another thing that bugged me is that I can subscibe to comments on my photos, but not to comments on say Karin's photos. (I should note here that apparently this suffers from the same problem as the first paragraph - if you lock a picture you won't see comments on it in your comment thread.) However, I got to thinking about it and realized that doesn't make sense. If I wasn't logged in then there is no way for Flickr to know what comments came from "my account". So I poked around. Sure enough, if you do some judicious URL editing you can create a comment stream RSS for any Flickr user. Here's the scoop.

 

If you click the link that says "Feed – Subscribe to recent activity on your photos" from your Flickr page you get a URL that looks something like this:

 

http://api.flickr.com/services/feeds/activity.gne?id=35766250@N00&format=rss_200

 

(This is my own activity feed.)

 

That id=xxxxxxxx is the interesting part. From any Flickr user you can click "subscribe to photos" at the bottom of the page and you'll get a URL that looks like this:

 

http://api.flickr.com/services/feeds/photos_public.gne?id=35766250@N00&format=rss_200

 

(Again, that's a RSS feed for my photostream. All six photos.)

 

Now, you have a URL for comments for a given user, and you know how to extract the ID for any given User. So if you want to see the comments for some other user what you have to do is extract the id=xxxxxxxx field from their photo feed and paste it into the activity URL above and voila - that other user's recent comments!

 

All the usual disclaimers apply - this might not work for everybody, Flickr might break it at any time, yadda, yadda. I didn't get into the significance of the format= part (although Flickr does document that here.) I'm also not sure about the @N00 part. In my small sampling everybody has that, but that might change for Pro users or something. In general I'd suggest taking everything from the id= part and pasting it across.

 

technorati tags:, , ,

Blogged with Flock