You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this code, that is supposed to stream whatever Elon Musk is posting:
const twitter = new Twit({`consumer and access tokens provided`});
var stream = twitter.stream('statuses/filter', { track: '@elonmusk' });
stream.on('tweet', (tweet) => {
console.log(tweet);
});
stream.on('error', (error) => {
console.error(error);
});
But, whenever I run it, I get
Error: Bad Twitter streaming request: 404
at exports.makeTwitError (Documents/nCommBot/nCommentTwitter/node_modules/twit/lib/helpers.js:74:13)
at Request.<anonymous> (Documents/nCommBot/nCommentTwitter/node_modules/twit/lib/streaming-api-connection.js:96:29)
at Request.emit (node:events:525:35)
at IncomingMessage.<anonymous> (/Documents/nCommBot/nCommentTwitter/node_modules/request/request.js:1076:12)
at Object.onceWrapper (node:events:627:28)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: null,
allErrors: [],
twitterReply: '',
statusCode: 404
}
Honestly, I have no idea what is wrong with this noe....
The text was updated successfully, but these errors were encountered:
I have this code, that is supposed to stream whatever Elon Musk is posting:
But, whenever I run it, I get
Honestly, I have no idea what is wrong with this noe....
The text was updated successfully, but these errors were encountered: