I'm trying to figure out of a simple node.js script to retweet using Twitter API. I was able to create favorites, post status, but a retweet is not working.
// rt.js
var Twitter = require('twitter');
var config = require('./config.js');
var T = new Twitter(config);
T.post('statuses/retweet/:id', {
id: '870436914322472960'
}, (err, data, response) => {
if (err) {
console.log(err)
} else {
console.log(`${data.text} retweet success!`)
}
})
The error message is :
[ { message: 'Sorry, that page does not exist', code: 34 } ]
I'm using : twitter@1.7.0 (from npm list)
Thanks for your help.
via zoph
No comments:
Post a Comment