Wednesday, January 30

I want more OpenID providers

Yahoo! launched their OpenID provider site today. I’m happy with MyOpenID and delegation, though I may switch to our deal once we’ve fleshed out the functionality a bit more.

Still, I have the exact opposite philosophy from Dana Epp, who argues that what we need is more OpenID consumers, not providers:
This is the problem with OpenID. Everyone wants to be the provider of the identity. No one wishes to consume it and trust someone else. … We need more consumers.... not more providers. I talked about this back in 2006. Until we get more consumers going, OpenID will be on the cusp of being a geek thing.
From my perspective on Blogger, the exact opposite is true. We need so many OpenID providers that everyone on the web has one without even noticing it. Once every web page that represents identity (or persona, really) has OpenID baked into it, we can say “sign in with your OpenID! Yes, you already have one!”

Once we get over that hurdle and OpenID is more noticed, then people can start shopping around for the best identity provider and start picking out services that work for them.

The “one username and password” argument for OpenID has never been tremendously compelling, but tying activity from one site to another — such as, “the owner of www.grogmaster.com has commented here” — is incredibly interesting.

For that to happen, or at least get off the ground, we need 1,000 OpenID providers to bloom.

(Now, this post doesn’t take into account that Yahoo!’s OpenID setup which, save for a Flickr integration, is not tied to any URLs that already exist, and therefore fails the “you already have one” test slightly. Perhaps we need fewer providers, but more delegation? Still, it’s a reasonable upgrade path to go from signing in with a Yahoo or AIM account / OpenID to signing in with a URL that’s more meaningful to your current persona.)

Quick update: Simon Willison, in an interview with the Yahoo! Developer Network blog:
My personal dream feature would be for every one of my Yahoo! profile pages - on del.ici.ous, Upcoming, Flickr, Yahoo! Answers and more - to work as an OpenID. I'd like this not for authentication purposes but to let me "prove" my ownership of those profiles to other sites - I envisage all sorts of interesting mashups in the future based on users using OpenID to prove who they are on many different services.
Exactly.

Sunday, January 13

How to add a daily summary of Flickr photos to your blog’s feed

I’m a fan of FeedBurner, and I love their Link Splicer feature for adding each day’s new del.icio.us links to my feed. I wanted to do the same kind of thing for my photos.

FeedBurner supports Flickr for their Photo Splicer feature, but it splices in each image as an individual entry — far too spammy. Yahoo Pipes to the rescue!

Short version: Use my Flickr Daily Summary pipe to generate a feed with a post for your most recent day’s uploads. Then, create your own pipe and use the Union operator to merge the Flickr Daily Summary feed with your blog’s feed. You can use Blogger’s Post Feed Redirect URL setting to guide your subscribers to the new, unioned feed.

Update, 1/17: If you were trying this out and just got my photos from the 12th, try again. I just found that in refactoring I think some sub-Pipes flipped back to their default, debug settings. All is fixed now.

Long version about implementation and such:
From what I can tell, Yahoo Pipes doesn’t have a great way to merge several entries into one, so we can’t summarize based on the standard Flickr feed. Instead, we can use Pipes’ Fetch Page source to scrape Flickr’s daily archive page. The Get Day’s Flickr Thumbnails pipe does just this.

In order to load the correct daily archive page, however, we need to know what date to look for. The Flickr Daily Summary pipe does this by looking at the most recent entry in your Flickr feed.

There’s a bit of a caveat surrounding dates and timezones, however: Flickr’s <pubDate> elements are in US/Pacific, your photo archive is in your Flickr account’s timezone (US/Eastern in my case), and Pipes internally converts all dates to UTC. This last bit is significant because it affects the output of the Date Formatter module. When I first tried getting the daily archive page for the photos I uploaded at 11PM last night, Pipes was generating a date string for early this morning, UTC time: the wrong day. I wrote the Correct Timezone pipe to subtract the right number of hours from a date so that formatting it gave the output one would expect.

With the feed content in place, the last remaining step is to get the metadata right. The <author> element is just taken from the latest Flickr feed entry, as is the <pubDate>. The <link> and <guid> are both set to the daily archive page’s URL.

Important undocumented useful Pipes tips: To set the <pubDate> of an entry, you must set the y:published attribute to a date. To set the <guid> of an entry, you must set the y:id.value attribute.

Armed with a feed that will supply daily Flickr summaries (albeit one at a time, but that’s why aggregators have backend storage), you must splice (burn?) it into your blog’s feed. As a first pass, I tried Google Reader’s public feed for a tag I made of my blog feed and the daily Flickr feed, but I was unhappy with the amount of extra markup that Reader inserts. So, I went back to Pipes, which offers a Union operator to do exactly what I needed.

Since I was already running my feed through FeedBurner, I simply pointed it at the new, combined feed coming out of Pipes.

If you’re trying this using Blogger, use the Post Feed Redirect URL setting (Under Settings > Site Feed) to redirect your current subscribers to Pipes or (better yet) FeedBurner. Important note: If you do enable the Post Feed Redirect URL, you’ll need to add ?redirect=false to your feed when you fetch it via Pipes, or else Blogger will send Pipes a redirect when it tries to get the feed.

Let me know in the comments if you have any questions, or if you’re trying this out for yourself. If you’re subscribed to my feed, I hope you enjoy the photos!