0.0.1 • Published 11 years ago

post_to_social v0.0.1

Weekly downloads
1
License
-
Repository
github
Last release
11 years ago

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},