2
我得到一个名为“tumblrwks”(https://github.com/arkxu/tumblrwks)的库,它使用nodejs连接到tumblr API,我工作,但问题是我想让他们形成一个私人博客,为此我需要OAuth请求。Tumblr API - 如何使用NodeJS获取私人博客的帖子?
如何在Tumblr中获得OAuth(oauth_token & oauth_secret)?
这是我想使用OAuth到COMPLET代码,请帮我
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);
});
是的,我这样做说明之前,我需要有OAuth请求,以获得在私人博客的帖子 – kach 2013-03-04 08:59:16