Closed z0ph closed 7 years ago
Hello,
You simply have to replace :id
with your if :
T.post('statuses/retweet/' + 870436914322472960, '', (err, data, response) => {
if (err) {
console.log(err)
} else {
console.log(`${data.text} retweet success!`)
}
})
Hi @JulienSol
Strange, my id is passed with the following variable, don't need to hardcode it. But whatever, i've tried your code sample, with two different id :
[ { code: 144, message: 'No status found with that ID.' } ]
Thanks for your help,
Ah ! Yes, you have to convert id to string :
T.post('statuses/retweet/' + '870436914322472960', (err, data, response) => {
if (err) {
console.log(err)
} else {
console.log(`${data.text} retweet success!`)
}
});
@JulienSol It's working, thanks
Hello,
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 simple retweet is not working.
The error message is :
I'm using : twitter@1.7.0 (from npm list)
Thanks for your help.