Created
November 1, 2014 19:46
-
-
Save RyanNutt/950888c672ee411999fd to your computer and use it in GitHub Desktop.
Pin to Pinterest from command line with node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PinIt = require('pin-it-node'); | |
var pinIt = new PinIt({ | |
username: 'your_pinterest_username', | |
password: 'your_pinterest_password' | |
}); | |
var settings = { | |
boardId: 'Numeric_board_id', | |
url: process.argv[2], | |
description: process.argv[3], | |
media: process.argv[4] | |
}; | |
pinIt.pin(settings , function(err, pinObj) { | |
if (err) { | |
console.log('Error'); | |
console.log(err); | |
return; | |
} | |
console.log('Success!'); | |
console.log(pinObj); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'll need the pin-it-node library from https://www.npmjs.org/package/pin-it-node to make this work.
And if you don't feel like going through the HTML for your Pinterest page to find the numeric board id I put a little tool online that will find it for you at http://www.nutt.net/how-do-i-get-pinterest-board-id/