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:
- Loading the editor
- Getting the story permalink
- Building the embed code from the story permalink
- Getting story data using the API
- Getting the list of stories for a user
Loading the editor
To integrate the Storify editor in your web application, load it in an iFrame and pass it a
To create a new story:
To edit an existing story:
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
Building the embed code from the story permalink
storyPermalink, you can easily reconstruct the embed code:
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
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: