Node.js Flickr API:缺少必需参数";auth";
我在nodejs express中使用flickr sdk将照片上传到我的flickr应用程序。虽然我遵循flickr sdk上的示例,但不起作用。 ` ` 我收到错误:缺少必需的参数“auth”。我错过什么了吗Node.js Flickr API:缺少必需参数";auth";,node.js,flickr,Node.js,Flickr,我在nodejs express中使用flickr sdk将照片上传到我的flickr应用程序。虽然我遵循flickr sdk上的示例,但不起作用。 ` ` 我收到错误:缺少必需的参数“auth”。我错过什么了吗 const oauth = new flickr.OAuth( config.FLICKR_CONSUMER_KEY, config.FLICKR_CONSUMER_SECRET ); oauth.requ
const oauth = new flickr.OAuth(
config.FLICKR_CONSUMER_KEY,
config.FLICKR_CONSUMER_SECRET
);
oauth.request('http://localhost:3000').then(function (res) {
const oauth_token = res.body.oauth_token
const oauth_token_secret = res.body.oauth_token_secret
const auth = new flickr(oauth.plugin(
oauth_token,
oauth_token_secret
));
let upload = flickr.Upload(auth, req.files[0].buffer, {
title: 'Works on MY machine!'
});
upload.then(function (res) {
console.log('yay!', res.body);
}).catch(function (err) {
console.error('bonk', err);
});
}).catch(function (err) {
console.error('bonk', err);
});