Will "the Mighty" Strohl

oEmbed API Wrapper for .Net Released

I happened across a REST standard for importing remote content today called oEmbed.  It uses REST to display embedded content from other websites.  This specific method avoids (but doesn’t get rid of) XSS issues that are experienced with importing content from other websites.  Using either JSON or XML, you make a GET request using the oEmbed standard, which will return the remote content that you can embed into your own website. 

There are many ways to do this, but using this method, you can gain a higher level of usability over user-entered content in your own web applications.  For example, imagine your end-user having to add a YouTube video into an online editor.  They’d have to:

  1. Find the video on YouTube
  2. Copy the embed HTML
  3. Figure out where and how to paste content into the source of the editor
  4. Paste the HTML source code into the editor
  5. Save the content

For anyone reading my blog, this is a trivial task that can take less than a minute.  However, the average website visitor will not be able to or be confident enough to go through those seemingly simple steps.  Instead, wouldn’t it be easier to just have them paste the URL of the webpage into the text portion of the editor and just save the content? Of course!  That’s where oEmbed steps in.

By implementing oEmbed, you can just have your visitor paste the YouTube URL into the content area, and save it.  However, you’d use oEmbed to switch out that URL for the actual content. Turning something like this:


Into this:

You can find a code sample for this on the documentation of the oEmbed wrapper for .Net.  And the best part is that you are not limited to only YouTube.  Using the oEmbed API Wrapper for .Net, you can do this will various videos, photos, and other embeddable content, such as widgets.

In this first release, I have given you all of the tools to make this happen in your own web applications:

  • Concrete implementations for: Clearspring Widgets, Flickr, Hulu, MyOpera, oohEmbed, Poll Everywhere, Qik, Revision3, Viddler, Vimeo, YouTube
  • Open implementation to call any other oEmbed provider
  • Ability to set an Internet proxy for the REST requests

Download and try out this for yourself.  I’d love to get your feedback.

Technorati Tags: ,,,,

blog comments powered by Disqus