twitterbot-nodejs
twitterbot-nodejs copied to clipboard
Still working but only for a few minutes
I have used the code for retweet bot, and it works for some time after a few minutes or few retweets there will be an error showing
for (var i = 0; i < tweets.length; i++) { 2020-09-24T07:10:23.494987+00:00 app[worker.1]: ^ 2020-09-24T07:10:23.494987+00:00 app[worker.1]: 2020-09-24T07:10:23.494988+00:00 app[worker.1]: TypeError: Cannot read property 'length' of undefined
Few questions and observations:
- Did you debug the code?
- Where in the code is this from? (a full stacktrace would be helpful)
- Looks like the returned value for
tweetsitself is null.
On a side note, know that twitter has updated its API many times .. almost every year. So this code is probably not in sync with what their API does anymore. 🤷