twitterbot-nodejs icon indicating copy to clipboard operation
twitterbot-nodejs copied to clipboard

Still working but only for a few minutes

Open tornadough opened this issue 5 years ago • 1 comments

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

tornadough avatar Sep 24 '20 07:09 tornadough

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 tweets itself 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. 🤷

nisrulz avatar Sep 24 '20 10:09 nisrulz