The SocialPublish API currently has just two easy calls:
The current 0.2 version of the API is still in beta.
Every call to the API has to be signed with the access_token attached to your account. You can find your
access_token on the dashboard page after you login to your SocialPublish account.
Use this API call if you want to publish your message to the social media accounts you connected with your SocialPublish account. It requires two variables: an access_token, and a body containing a JSON object with the information about the content you want to publish.
HTTP request method:POST
url:http://socialpublish.io/api/0.2/publish
variable:access_token, body
{
"title" : "Publish your blog to Twitter and Facebook!",
"message" : "You have to see the SocialPublish API!"
"link" : "http://socialpublish.io/api",
"hashtag" : "#socialpublishio, #winning",
"hubs" : [
"twitter:14678334",
"facebook:509968792"
]
}
{
"success" : true,
"type" : "publish"
}
{
"success" : false,
"type" : "invalid_access_token",
"message" : "The provided access_token is invalid."
}
Use this API call if you want to fetch a list of social media accounts connected to your SocialPublish account. The call will only return the social media accounts you have enabled.
request method:GET
url:http://socialpublish.io/api/0.2/hubs
variable:access_token
{
"success" : true,
"type" : "hubs",
"hubs" : [
{
"type" : "twitter",
"id" : "14678334",
"key" : "twitter:14678334",
"name" : "jorgenhorstink"
},
{
"type" : "facebook",
"id" : "509968792",
"key" : "facebook:509968792",
"name" : "Jorgen Horstink"
},
{
"type" : "facebook page",
"id" : "299970546735855",
"key" : "facebook page:299970546735855",
"name" : "socialpublish.io"
}
]
}
{
"success" : false,
"type" : "invalid_access_token",
"message" : "The provided access_token is invalid.",
"hubs" : []
}