Twitter Bot https://t.co/ZzE6pCRSA0 https://t.co/1176CEpFqJ pic.twitter.com/a4vCMczTHa
— XKCD Comic (@xkcdComic) February 22, 2016
Tutorials¶
General¶
- How to Make a Twitter Bot: The Definitive Guide (by Stefan)
- Twitter bots and accessibility: Make sure everyone can enjoy your bots. (Stefan via fourtonfish.com)
- Twitter and Procedural Generation: Twitter bots and creative limits with procedural generation. (Joe Sondow via youtube.com)
node.js¶
- Botwiki on Glitch: node.js starter projects for Twitter bots (Stefan via glitch.com)
- Twitter Bot Tutorial – Node.js and Processing: A six-part video tutorial with node.js and Processing. (Daniel Shiffman via youtube.com)
- tracery-twitter-bot: Glitch starter project for making generative Twitter bots using Tracery. (byronhulcher via glitch.com)
- Make a Twitter bot that tweets random images (by Stefan)
- Smarter & Cuter Bots: Video tutorial using GraphicsMagick and Microsoft’s Cognitive Services. (Rachel White via youtube.com)
See also: Twitter bot project templates on Glitch
Python¶
- What is a Twitter bot?: First of a two-part series on Twitter bots, covers what they are and some examples. (Molly White via blog.mollywhite.net)
- How to create a Twitter bot: Second of a two-part series on Twitter bots, discusses how to create them. (Molly White via blog.mollywhite.net)
- Build A Bot Workshop: Video from a workshop at the PyDX 2015 Python conference. (Terian Koscik via spinecone.gitbooks.io)
- Making a bot that tweets a random image (by Stefan)
- Build and Deploy Twitter Bots with Python, Tweepy and PythonAnywhere: A beginner-friendly guide to making Twitter bots with Python. (Iyanuoluwa Ajao via twilio.com)
- How To Create a Twitterbot with Python 3 and the Tweepy Library: This tutorial will walk you through two Twitterbot programs, one that tweets from a file, and one that retweets, follows, and favorites. (Lisa Tagliaferri via digitalocean.com)
- Using Twitter bots for data visualization: Twitter bots can be an effective method for data visualization. (Stefan via stefanbohacek.com)
- Tutorial Creating a Twitter bot with Python, OAuth 2.0, and v2 of the Twitter API: By the end of this tutorial, you should be able to create a Twitter bot that utilizes OAuth 2.0 Authorization Code Flow with PKCE for authentication. (Jessica Garson via developer.twitter.com)
- Noun Verb Bot: Twitter bot starter project for Python 3 using OAuth 2.0. (Jessica Garson via glitch.com)
- Kickstart your Twitter bot with our Glitch example written in Python: Creating a Twitter bot is a great way to engage with the public conversation. (Jessica Garson via developer.twitter.com)
- Five Steps To Build Your Own Random Non-Sequitur Twitter Bot: Create and host your Twitter bot on Heroku. (Lauren Orsini via readwrite.com)
- How to Code a Simple Twitter Bot for Complete Beginners: Twitter bot tutorial with Python and Heroku. (Sarah Sahim via tutorials.botsfloor.com)
- Coding a simple Twitter bot: Tutorial from the creator of the @futuremash Markov chain bot. (Anthony Gladman via medium.com)
- Devs in the Details: How to Create a Twitter Bot: In this tutorial, Twitter developer advocate Jessica Garson gives us a step by step look into how she created her Cat Facts bot. (Jessica Garson via youtube.com)
- How to Build a Twitter Text-Generating AI Bot With GPT-2: Learn how to make a Twitter bot with a text-generating neural network model (Max Woolf via minimaxir.com)
Never ceases to amaze, stun me that a significant number of the “people” on Twitter are programs.
— Josh Marshall (@joshtpm) March 10, 2017
Ruby¶
- Civ V Random Game Generator Twitterbot: Create a Twitter bot with Rails to randomly generate game rules for Civilization V and host it on Heroku. (Katelyn Dinkgrave via katelyndinkgrave.com)
- Your Own @Horse_ebooks: Create an "ebooks"-style Twitter bot with Ruby and Heroku. (Josh Trommel via medium.com)
Tracery/Cheap Bots Done Quick¶
Check out the dedicated Tracery page.
SSBot (Google Spreadsheets)¶
Tutorials that use Zach Whalen‘s Google Spreadsheets-to-Twitterbot tool.
- Tiny Flashing Thumbs: How to bot your way to "fake news" success. (Zach Whalen via medium.com)
- Hook, bait and camouflage: Making a "honeybot". (Nora Reed via medium.com)
- How to make a Twitter Bot with Google Spreadsheets: Tutorial for SSBot version 0.4. (Zach Whalen via zachwhalen.net)
Raspberry Pi¶
- Raspberry Pi Twitterbot: Tutorial with a Raspberry Pi and Python. (Scott Kildall via instructables.com)
- How to build a nonsensical Twitterbot on the Raspberry Pi: This guide shows you how to set-up a Twitterbot in a similar vein to Horse_ebooks. (Emily King via radix-communications.com)
- Python + BeautifulSoup + Twitter + Raspberry Pi: Make a Twitter bot with Python, BeautifulSoup, and a Raspberry Pi. (Robin Camille Davis via emerging.commons.gc.cuny.edu)
Other languages¶
- Build Your Own Topic Bot: Tutorial with IFTTT and Wikipedia. (Hatnote via blog.hatnote.com)
- How to Write a Twitter Bot in 5 Minutes: With Wolfram Alpha and Google Drive. (Amit Agarwal via labnol.org)
- Tutorial on Python Twitter Bots: Tutorial in Jupyter Notebooks. (@mcburton via github.com)
- How to Build a Law Bot: With Jupyter Notebooks. (David Colarusso via lawyerist.com)
- Tutorial on Creative Twitterbots: This tutorial considers what it means for a text to be creative and briefly surveys the emerging technology of Twitter bots. (Tony Veale via slideshare.net)
- How I Built a Twitter Bot Using Auth0 Webtasks and Data.gov: Learn how to use Auth0 Webtasks to build a twitter bot that pulls data from Data.gov and does sentiment analysis. (thzinc via auth0.com)
- Create a simple, free, text-driven Twitterbot with AWS Lambda & Node.js: A tutorial with a very descriptive title. (Erin McKean via medium.com)
- Polyglot Twitter Bot: Six-part series on making Twitter bots with node.js, Python, Purescript and Amazon AWS. (Joel Grus via joelgrus.com)
- Twitter’s missing manual: A list of hidden features and a few notes on etiquette. (@eevee via eev.ee)
- Alt text support for Twitter Cards and the REST API: Blog post announcing support for ALT text for images in Twitter Cards. (@twitterdev via blog.twitter.com)
- API support for 140 second video: Upload videos of up to 140 seconds in length. (@twitterdev via twittercommunity.com)
- Tweet Metadata Timeline: The history and key concepts of Twitter metadata. (Jim Moffitt via support.gnip.com)
- Emoji on Twitter: These emoji will work in your Twitter name and bio. (Emojibase via emojibase.com)
See also @twitterapi for updates on the Twitter API and the Twitter Developer Platform Roadmap Trello board.
Twitter delays shutdown of legacy APIs as it launches a replacement https://t.co/OGEWfHT4E8 via @techcrunch
— A friendly encyclopedia of 🤖💻💾 (@botwikidotorg) May 17, 2018
Migration Guide: Moving from User Streams/Site Streams to Account Activity API: https://t.co/pgQ4U1EVaE
— A friendly encyclopedia of 🤖💻💾 (@botwikidotorg) May 17, 2018
Some #TwitterAPI Trivia
Twitter launched in 2006, and just a few months later, the Twitter API was released. 🎉
The first s̶e̶t̶ ̶o̶f̶ ̶d̶o̶c̶s̶ doc for v1 looked like this 👇 pic.twitter.com/VpvIma5wRk
— Twitter Dev (@TwitterDev) July 15, 2020
Frameworks and libraries¶
Twitter API¶
node.js¶
- twit: Popular Twitter API library for node.js. (Tolga Tezel via github.com)
Python¶
- tweepy: "Twitter for Python!" (Tweepy via github.com)
- twython: Python wrapper for the Twitter API. (Ryan McGrath via github.com)
- twitterqa: Deep learning-based "Imposter Twitter Chatbot". (Pascal van Kooten via github.com)
- heroku_ebooks: Generate Markov chains and post to an _ebooks account on Twitter using Heroku. (Tom Meagher via github.com)
Ruby¶
- chatterbot: Ruby-based Twitter bot framework, using OAuth to authenticate. (Colin Mitchell via github.com)
- twitter_ebooks: A framework for building interactive twitterbots which respond to mentions/DMs. (Jaiden Mispy via github.com)
- rubybottools: A collection of tools for twitter_ebooks and other Ruby-based bots. (Brett O'Connor via github.com)
Java¶
- markov: Java library for making Markov chain Twitter bots. (Joe Sondow via github.com)
- lambda-twitter-base: Template project for building a Twitter bot that can be run by AWS Lambda. (Joe Sondow via github.com)
Other languages¶
- anaconda: Go library for the Twitter API. (Aditya Mukerjee via github.com)
- twitterBot: Twitter bot library written in Elixir. (Matteo Redaelli via github.com)
- Literal Twitter Bot Kit: A kit that will help you connect a toy bird to your Twitter app using an Arduino. (BubbleSort Zines via adafruit.com)
For more frameworks and libraries built for the Twitter platform, check out Twitter Libraries at developer.twitter.com.
Working with language¶
- markov-twitter-bot: A node.js library for making Markov chain "ebooks" Twitter bots. (Mike Dettmer via github.com)
- twitter-text: Collection of libraries and conformance tests to standardize parsing of Tweet text (Java, Ruby, node.js, and Objective-C). (Twitter via github.com)
Python¶
- word-tools: Collection of tools/mini-bots that do various language-related things. (Hugo via github.com)
- twitter_markov: Create Markov chain/ebooks accounts on Twitter. (Neil Freeman via github.com)
Working with images¶
Python¶
- randimgbot: Pick a random image and tweet it. (Hugo via github.com)
- spatchwork: Create segmentation-based image filter ("patchwork" effect). (Bob Poekert via github.com)
- binary-numbers: Update a Twitter profile picture with a dynamically created image. (Ross Spencer via github.com)
Tools¶
See also: A list of Twitter-bot hosting platforms.
Python¶
- sycorax: Twitter library that choreographs the online behavior of fictional characters. (Leonard Richardson via github.com)
Other¶
- I Will Dance The OAuth Dance For You: Tool to help obtain OAuth credentials for an account. (George Buckenham via v21.io)
- Bot Auther: A lightweight Twitter Authenticator server for quickly obtaining API keys, particularly useful for orchestrating multiple bots from a core developer account. (Thomas Moore via github.com)
Latest from the blog
Twitter shutting down free access to their API on February 9
I keep saying it's an end of an era quite often these days.
How do folks get into creative botmaking?
Sharing the stories of our early botmaking days.
What kind of bots are posting in the fediverse?
Exploring the bots people make and follow in the fediverse.
Botwiki Interview: Nora Reed
Discussing Twitter, bots, and reasons to stay hopeful.