-
Notifications
You must be signed in to change notification settings - Fork 552
Open
Description
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....
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels