Closed K-Rintaro closed 3 years ago
I found the cause of the problem. "created_at" (the time that the tweet was created) is wrong.
Source code:
client.stream('statuses/filter', {follow : 'TWITTER_USER_ID'}, function(stream) {
stream.on('data', function(data) {
console.log(data.created_at)
});
});
Result:
Sun Jan 10 11:51:18 +0000 2021
Sun Jan 10 11:51:50 +0000 2021
Sun Jan 10 11:51:57 +0000 2021
Remember that the Twitter user did't tweet while this code was running.
Using "client.stream", node-twitter gets old tweets every five minutes when Twitter user doesn't tweet. It seems that node-twitter gets older and older tweet as time goes on.
Source code: