Flock | the social web browser

Media RSS

Warning: the following describes a feature of Flock 2.0 beta, not available in 1.2 and earlier versions.

One way to integrate your website with Flock is to write a Flock extension including an XPCOM service providing media features. However, this is a complex task and requires users to install this extension in order to get the integration features.

A much easier and lightweight way to integrate your service with Flock is by implementing the Media RSS standard. The features you would get are:

  • Media icon in the URL bar glows when the user is on a page that represents a media feed (for example, the profile page of a user)
  • Clicking on the icon will open the stream in the mediabar
  • The user can subscribe to the stream and be notified when the stream is updated

Additionally, a hidden feature will allow advanced users to add search to your service.

a Media RSS feed from Smugmug

[edit] Implement Media RSS discovery

The Media RSS format has been defined by Yahoo!, and is now one of the most popular extension to RSS 2.0 to represent feeds of media items. If your site already provides RSS feeds, all you have to do is add a some tags of the Media RSS namespace to your feed.

You can read the official specification, or just implement the tags that Flock needs.

  • add xmlns:media="http://search.yahoo.com/mrss/" to the "rss" tag of your feed
  • For each item, add the following tags:
    • an <enclosure> tag that includes a type attribute (usually "image" or "video")
    • a <media:thumbnail> tag

This is it! Now when a Flock user visits a page that is advertising this feed, the media icon will glow orange and let the user see your feed in the mediabar.

[edit] Search in Flock's mediabar

To provide search functionality on your website to Flock's mediabar, you need to provide a feed for search results. Any user can then add your website to the mediabar's searchbar by:

  • opening the URL "about:config"
  • change the value of flock.photo.rssSearch to a JSON string of the following form:

[{"someid":{"id":"someid","title":"My Website Title","url":"http://www.mywebsite.com/feed?query=%s","icon":"http://www.mywebsite.com/favicon.ico"}}]