Skip to content

Instantly share code, notes, and snippets.

@RyanNutt
Created November 1, 2014 19:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanNutt/950888c672ee411999fd to your computer and use it in GitHub Desktop.
Save RyanNutt/950888c672ee411999fd to your computer and use it in GitHub Desktop.
Pin to Pinterest from command line with node
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);
});
@RyanNutt
Copy link
Author

RyanNutt commented Nov 1, 2014

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment