I get a library named "tumblrwks" ( https://github.com/arkxu/tumblrwks ) that connect to the tumblr API using nodejs and i works, but the problem is i want get them form a private blog and for that i need the OAuth request.
How i can get the OAuth ( oauth_token & oauth_secret ) in Tumblr ?
this is the code that i want to complet with the OAuth, please help me
var Tumblr = require('tumblrwks');
/*
You can get the consumerKey and consumerSecret by registing a tumblr app: http://www.tumblr.com/oauth/apps
*/
var tumblr = new Tumblr(
{
consumerKey: 'YOUR_CONSUMER_KEY',
consumerSecret: 'YOUR_CONSUMER_SECRET',
accessToken: 'ACCESS_TOKEN',
accessSecret: 'ACCESS_SECRET'
}, "void2012.tumblr.com"
// specify the blog url now or the time you want to use
);
tumblr.get('/info', {hostname: 'void2012.tumblr.com'}, function(json){
console.log(json);
});
You should go register an application on tumblr by going to http://www.tumblr.com/oauth/apps.
Once you complete the registration, you'll get your api key.
From http://www.tumblr.com/docs/en/api/v2:
You'll need this to get your API key, even if you don't ever need to use a fully signed OAuth request