Skip to content
Post to social media sites
CoffeeScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
control
README.md
app.coffee
errors.coffee
package.json

README.md

PostToSocial

A small module for posting images and statuses/tweets to social sites

Usage

npm install PostToSocial

var facebook = require('PostToSocial').facebook()
var twitter = require('PostToSocial').twitter("j8Z5sYGX1peJuyG4P5kCWQ", "lQ8yY6LqKd4XUjwYIsv3JsqCQbp1NTwMIyVNhb6dxk")

facebook.postImage(status, imageUrl, userToken, function(err, facebookResponse){})
facebook.postStatus(status, userToken, function(err, facebookResponse){})

twitter.postImage(tweet, imageUrl, userToken, userSecret, function(error, twitterResponse){})
twitter.postTweet(tweet, userToken, userSecret, function(error, twitterResponse){})

Included Errors

  {type: "ImageUrlRequired", message: "imageUrl is a required parameter.", statusCode: 400},
  {type: "SocialAuthenticationRequired", message: "Author must be authenticated with the associated social network to perform this action.", statusCode: 400},
  {type: "TextRequired", message: "'text' is a required parameter.", statusCode: 400},
  {type: "MissingParameters", message: "This method requires more parameters.", statusCode: 400},
Something went wrong with that request. Please try again.