Back to top

Integrate the Storify editor

If you have your own web based CMS, you may want to integrate the Storify editor right into it so that your users don't have to open a new window, copy the embed code of the story they've created, and return to your platform to paste it into a new blog post.

We've made it very easy to do just that.

This section outlines using the Storify editor:

Screenshot of the Storify integration on BarackObama.com


Loading the editor

To integrate the Storify editor in your web application, load it in an iFrame and pass it a callback parameter.

To create a new story:

http://storify.com/create?callback=http://mysupercms.com/callback

To edit an existing story:

http://storify.com/testuser/teststory/edit?callback=http://mysupercms.com/callback


Getting the story permalink

When the user publishes the newly created story (or changes to an existing story), we redirect the user to the callback URL (in the parent window). We pass to that URL a new GET parameter: storyPermalink.

http://mysupercms.com/callback?storyPermalink=http://storify.com/testuser/teststory


Building the embed code from the story permalink

With the storyPermalink, you can easily reconstruct the embed code:

<script src="storyPermalink.js"></script>


Getting story data using the API

Call our API to get all the data of the story. (For example, you may wish to get the text of the story to index in your database.)

To do this, hit the stories API endpoint: http://api.storify.com/v1/stories/username/slug - where /username/slug is the storyPermalink minus http://storify.com.

For more information see the Stories section.


Getting the list of stories for a user

Because the storyPermalink contains the username of the user (the permalink of a story is always http://storify.com/:username/:story-slug), you can easily parse it to call our Users API and get the list of published/draft stories of that user:

http://api.storify.com/v1/users/testuser