Storify: Filtering the Social Web and YouTube Videos to Make News Items

Storify is part of the Google I/O Sandbox, and provides a super simple drag and drop user experience to create stories using elements from the web: tweets, YouTube videos, Facebook updates, SlideShare presentations, audioboo files, and so on.This post explains how we incorporate videos in Storify using YouTube Data API and Player API. All the […]

Storify is part of the Google I/O Sandbox, and provides a super simple drag and drop user experience to create stories using elements from the web: tweets, YouTube videos, Facebook updates, SlideShare presentations, audioboo files, and so on.

This post explains how we incorporate videos in Storify using YouTube Data API and Player API. All the code snippets are in JavaScript.

"To create a Storify source, we need to be able to get a feed of results using JSONp (basically JSON with a callback function so that you can do cross domain calls; from the YouTube API perspective this is the JSON-C format). For YouTube, the main search API endpoint looks like this:

This function is called when the user clicks Submit in the search tab of the YouTube source in the Storify Editor. The main controller executes the request and sends the JSON result to the results method, which returns an array of normalized results:

The story element also provides the oEmbed HTML code. This is used to render the video embed when the video is added to the story. For that purpose you can use YouTube Player API with their new iframe embed.

to add the Storify Editor to your site

The Storify Editor can be called in an iframe. You just need to provide a callback parameter, like this: http://storify.com/story/new?callback=yoursiteurlcallback. The user will be asked to authenticate with Twitter and then will be able to create a new story. Once the user is done and hits "Publish", we call you back, passing you the permalink of the new story created:yoursiteurlcallback?permalink=storyPermalink.

You can then either fetch the JSON of the story by appending ".json" to the storyPermalink or you can embed the story by loading <script src=”storyPermalink.js”></script>. This's a great way to provide your community with a way to create stories right from your site," explains Xavier Damman, Storify co-founder.

The tools will remain free, but Storify will consider selling ads or charging brands to use the service, said Damman. Levi's and Samsung have already used it for marketing campaigns.

More Info: Storify

[Via: YouTube API blog]