« Slinging the World Cup | Main | Atom 1.0 for SmartFeed in Bloglines »

FeedFlare Scratchpad

feedflarescratchpad.pngThis past Friday, we had our third Hackathon here at FeedBurner. My project was to create a FeedFlare development environment, since creating and debugging FeedFlare Units right now is like spelunking without a flashlight. So I created the FeedFlare Scratchpad as a rudimentary start to this development environment.

Below the fold is a simple walkthrough for how this tool works. I hope it helps some enterprising FeedFlare developers out there!
Here's a sample walkthrough of how a developer might use the FeedFlare Scratchpad. Let's say that you want to develop your own version of the "Email This" FeedFlare.

1. Go to the FeedFlare Scratchpad

Easy enough ... just click on this link: FeedFlare Scratchpad.

2. Enter a FeedFlareUnit in the text area

Copy this XML and paste it into the FeedFlare Unit text area and hit "Go!"



3. Fix the XML

That didn't work because the XML is invalid ... we have to make sure we encode that ampersand before the "body" parameter correctly.


So let's change that encode that ampersand. Paste this version into the text box:



4. Add the Text element

Still no dice ... now it's saying we need the "Text" element.


A look at the FeedFlare Developer Guide tells us that we need a Text element for a static FeedFlare, so let's add it. Paste this version into the text box:



5. Enter a feed URL

Alright ... now that we have what appears to be a valid FeedFlare Unit, let's test it against an item in a feed. Enter a feed URL (it doesn't have to be a FeedBurner feed) and hit "Go!". For this walkthrough, enter "http://feeds.feedburner.com/publisherbuzz".

6. Select an item

After a feed is entered, we go and grab the latest version of the feed and display the items in a drop-down box. Go ahead and select one of the items to see how your FeedFlare will be applied to that item.


7. Profit!

After all of that, we have some results. We can now see if a FeedFlare would have been created for this item. If a FeedFlare isn't created, that might mean that one of your variable substitutions or XPath expressions is wrong. You can use the "Atom 1.0" view of the item to help tune your XPath expressions.

If a FeedFlare would be created, then the tool shows you a preview of how the FeedFlare would be rendered in a feed or on a site.

8. Explore

At this point, feel free to play around with the FeedFlare XML ... or choose a different item, or even a different feed. It can serve as a testing tool now.

There is certainly a bunch more that we can do with this tool, and some of the developers here are already teasing me that it's not using AJAX, but it's a start, and I hope you find it useful!

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)