Idea Melt

Focus Mode

Endpoints

Story - Create

Description

Creates a story defined by the parameters.

endpoint /story/create
method POST
authentication required
Parameters
user_url
required
URL of the user doing the action.
NOTE: This user must exist in your namespace within IdeaMelt
action_type
required
The slug of the action type that is being used.
NOTE: Make sure you've added this action type in your Dashboard settings
NOTE: Make sure you've linked this action type to the object type below in your Dashboard
object_type
required
The slug of the object type of the object on which the action is performed.
NOTE: Make sure you've added this object type in your Dashboard settings
object_url
required
URL of the actual object on which action is being performed.
NOTE: This URL must be resolvable and unique
NOTE: The page referenced here must have OpenGraph information in <meta> tags
Response
{
    message_list: [ ], 
    success: true, // always use this boolean to check if the request succeeded
    story: {
        action: "like", 
        echo_id: "http://stocial.com/stories/echo/item/61fc3b75aa24481a920dc63637a875cd", 
        object_instance: "http://espn.go.com/boston/nfl/story/_/id/8420985/", 
        actor: "https://twitter.com/shahjahanw"
    }, 
}
story
object
Content of the story that was created.
Example Request
// make sure you've initialized the library
// before you make requests using it!
// if you haven't, type in the following
IdeaMelt.init({api_key: IDEAMELT_KEY})

// now you're ready for awesomeness!
var data =  {
    user_url: "http://www.en.wikipedia.org/henry_ford",
    action_type: "like",
    object_type: "blog",
    object_url: "http://opinionator.blogs.nytimes.com/2013/05/13/the-art-of-repetition/"
}
var success = function(r) {
    // everything went perfectly, do something awesome now!
    // remember, this will fire asynchronously
}
var fail = function(r) {
    // yikes! something didn't go right
    // console.log(r.message_list) to see messages from the server
    // ps. this will also fire asynchronously
}

// success and fail are optional parameters
IdeaMelt.send('StoryCreate', data, success, fail);