Skip to content

Instantly share code, notes, and snippets.

@rampicos
Created October 5, 2015 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rampicos/3b86a2ab466cddfa933e to your computer and use it in GitHub Desktop.
Save rampicos/3b86a2ab466cddfa933e to your computer and use it in GitHub Desktop.
//social.js available at https://gist.github.com/rampicos/4320296
var social = require('social');
var linkedin = social.create({
consumerSecret : CONSUMER_SECRET,
consumerKey : CONSUMER_KEY,
site: 'linkedin'
});
linkedin.authorize();
messageContent = {
"comment" : "Testing LinkedIn for AppC",
"content" : {
"title" : "LinkedIn Appcelerator Module On SocialJS",
"submitted_url" : "http://www.appcelerator.com",
"submitted_image_url" : "https://static.appcelerator.com/images/header/appc_logo.png",
"description" : "My Description text"
},
"visibility" : {
"code" : "anyone"
}
};
linkedin.shareToLinkedin({
message : messageContent,
success : function() {
alert("Linkedin Posted Successfully");
},
error : function() {
alert("Error while posting");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment