Skip to content

Instantly share code, notes, and snippets.

@RyanNutt RyanNutt/pin_it.js
Created Nov 1, 2014

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.