---
title: "Discussion on \"Creating A Twitter Bot with Node.js\" | Hashnode"
description: "Discussion on \"Creating A Twitter Bot with Node.js\". Learn how automated Twitter accounts work by creating a bot that summarizes articles."
url: "https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Creating A Twitter Bot with Node.js](https://asaoluelijah.hashnode.dev/creating-a-twitter-bot-with-nodejs?utm_source=hashnode&utm_medium=feed)

Learn how automated Twitter accounts work by creating a bot that summarizes articles.

May 19, 2022 · 8 min read · asaoluelijah.hashnode.dev  
Updated Jun 20, 2022  
Read the article

-   [#thw-web-apps](https://hashnode.com/tag/thw-web-apps)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#twitter](https://hashnode.com/tag/twitter)
-   [#apis](https://hashnode.com/tag/apis)

## Written by

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

@asaoluelijah · Nigeria

  
[View profile](https://hashnode.com/@asaoluelijah)

Hi, i'm Asaolu Elijah, i share technical articles here on hashnode. follow me

## Responses 18

Markdown supported · ⌘↵ to post

[deepu](https://hashnode.com/@pradeepb28)

[Aug 26, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6309013c38843b7139783400)

Looks like stream api requires elevation access? If so, how would you solve it normally? Like using search api?

One thing I didn't understand is, is the bot that you've created runs one time or listens all the time? Asking because I couldn't see any code like cron job or any timer that runs your bot for every x minutes.

THank you for making the post

[Emmanuel Omosaku](https://hashnode.com/@Omosaku-Emmanuel)

[Jun 3, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/62998f4b2869cf1c237542d1)

Amazing piece elijah, your style of explaining things is really good! Great work bro🙌

[Andrew Baisden](https://hashnode.com/@andrewbaisden)

[May 27, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6290bae09a7f929c55a447cd)

Such a great article and topic I have always been fascinated with Twitter bot creation.

[Steve Johnson](https://hashnode.com/@stevejohnson772)

[May 24, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/628c82a4b4bd016fc9a3029d)

Excellent work. Brilliantly explained. keep up the good work [Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 25, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/628c82a4b4bd016fc9a3029d#reply-628dd7d619bda58ac7fb0306)

Thank you, Steve :)

[Developer Avocado](https://hashnode.com/@AvocaDEV)

[May 23, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/628bcf7bbc26026fa45c204a)

Great article and great idea [Asaolu Elijah](https://hashnode.com/@asaoluelijah) 🙌

And cool tutorial!

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 25, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/628bcf7bbc26026fa45c204a#reply-628dd7c199d0b58aec5adaab)

Thanks a lot :)

[Chijioke Chika](https://hashnode.com/@cjchika)

[May 22, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/628a8441929bcf4c721d4df6)

Well done, Elijah.

[Chijioke Chika](https://hashnode.com/@cjchika)

[May 22, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/628a8348aad1d35780a000b6)

Well done, Elijah.

[Mohit Yadav](https://hashnode.com/@just-moh-it)

[May 22, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/628a1283929bcf4c721d455a)

In the code `client.v1.filterStream(...)`, you're using v1 of the Twitter API, and they have dropped support for filtered stream in **essential** API access, and is [deprecated, RIPing in October this year](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/filter-realtime/overview). Does your tutorial require elevated access as well (the one where you have to go through the long application process).

Great tutorial!

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 25, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/628a1283929bcf4c721d455a#reply-628dd79e99d0b58aec5ada9e)

Thank you for your feedback, Mohit :)

After reading your comment, I went to verify the `stream/filter` endpoint degradation. and it is accurate.

I'll probably write a follow-up article addressing that as well.

[Okosun Mary](https://hashnode.com/@marynoir)

[May 21, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6288d60baad1d357809fdcae)

This is a wonderful tutorial. Definitely trying this out👌. Thanks for sharing!!

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 21, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6288d60baad1d357809fdcae#reply-62891152929bcf4c721d3413)

Thank you, Mary :)

[Ranvir Choudhary](https://hashnode.com/@ranvir407)

[May 21, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/62885a109490454c4d8474a8)

OMG.... OMG... AHHH MAHHH GAWD!!!!!!!

**_i have been banging my head for 3 weeks trying to create a twitter bot_**

_3 weeks_

i finished the project 3 days ago or something. and had to do almost everything by myself because there's not a lot of up-to-date tutorials out there.

I also made things unnecessarily hard for myself, by **_implementing OAuth 1.0a three legged auth flow_**

i'm literally in shambles right now. it was so tough to make it and turns out after i finish making the bot this post comes up.

😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 21, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/62885a109490454c4d8474a8#reply-62891131aad1d357809fe3c2)

I feel you Ranvir 😅 I had a hard time building one too since Twitter upgraded the developer portal and migrated the API to v2.

So, I decided to write an article in case anyone else was facing the same issue, or just interested in exploring it.

[Ranvir Choudhary](https://hashnode.com/@ranvir407)

[May 28, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/62885a109490454c4d8474a8#reply-62925a720989e6b52feafdce)

[Asaolu Elijah](https://hashnode.com/@asaoluelijah) lol yeah. almost all the tutorials are outdated now and you have to consult 2 different pieces of documentation(twitter API docs and twitter-api-v2 package docs) just to make the bot

[FOLASAYO SAMUEL OLAYEMI](https://hashnode.com/@Saint-Vandora)

[May 20, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6287c3118fb776481a285c48)

Awesome. I love this.

[Diego Ballesteros (Relatable Code)](https://hashnode.com/@diegoballesteros)

[May 20, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/62879d7d89168247f55ef443)

Recently made my own Twitter bot. Was cool seeing someone else's experience with one. Thanks for sharing!

[Roger](https://hashnode.com/@Rogcodes)

[May 20, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6287697c89168247f55ee89c)

Nicely summarised, Elijah! 👍

Thank you for sharing! 🙃

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 20, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6287697c89168247f55ee89c#reply-62876df889168247f55eea0f)

Thank you so much, Roger :)

[Victor Eke](https://hashnode.com/@Eke)

[May 20, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/628765348fb776481a2849f6)

Nice project [Asaolu Elijah](https://hashnode.com/@asaoluelijah) and great explanation too. Will try it out. 😅

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 20, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/628765348fb776481a2849f6#reply-62876dde8fb776481a284c2c)

Thanks, Victor 🙌

[Paul Ibeabuchi](https://hashnode.com/@NaruDesigns)

[May 19, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6286b59b83966a1653f15cb0)

Awesome piece, thank you!

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 20, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6286b59b83966a1653f15cb0#reply-62876dc18fb776481a284c1b)

Thanks a lot, Paul

[Eleftheria Batsou](https://hashnode.com/@eleftheriabatsou)

[May 19, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/62864ae87b02ca162edae9b6)

That's a great example of doing sth useful and at the same time productive! Thanks for sharing it [Asaolu Elijah](https://hashnode.com/@asaoluelijah).

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 19, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/62864ae87b02ca162edae9b6#reply-62865ab67b02ca162edaec33)

Thanks a lot, Eleftheria 🙌

[Anmol Wadhwa](https://hashnode.com/@anmolwadhwa)

[May 19, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6286254d83966a1653f149ec)

Wow! Looking forward to create my own bot and if I get stuck I know whom to contact 🤪

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 19, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/6286254d83966a1653f149ec#reply-62862b8f7b02ca162edae535)

Hi, Anmol. If something comes up, I'm happy to assist 😅

[Monica Matthews](https://hashnode.com/@jane223)

[May 19, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/62861e0983966a1653f148a5)

I have been trying to make a Twitter bot. Thanks for writing this.

[Asaolu Elijah](https://hashnode.com/@asaoluelijah)

[May 19, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/62861e0983966a1653f148a5#reply-62861f3e7b02ca162edae3a8)

Hi Monica, i'm glad the article was helpful :)

[Mohit Yadav](https://hashnode.com/@just-moh-it)

[May 22, 2022](https://hashnode.com/posts/creating-a-twitter-bot-with-nodejs/62860c2483966a1653f145bf/comment/62861e0983966a1653f148a5#reply-628a115d929bcf4c721d452f)

Same here! Thanks for the article ❤️
