Written by Aaron Bell
Dogecoin Twitter bot
To make a hopefully-useful Twitter bot, I learned to tweet from a program! Here’s what I did:
- Sign up for a Twitter dev account (expect lotsa writing)
- Wait until accepted
- Have a Twitter API library (like twitter-api for Clojure) for your language imported into your project
- Log out of the current account and log into what you want the app to control
- DL and install Ruby
gem install [twurl](https://github.com/twitter/twurl)on the CLI
- From your OS’s native CLI (this didn’t work for Bash for Windows, only on Powershell) run
twurl authorize --consumer_key=[key] --consumer_secret=[secret]. There are literally six different terms describing what a consumer key is here. It’s your API key for your project.
- Go to your home folder and open the .twurlrc file.
- Pull the user access token and secret (I forget what Twurl calls it)
- Paste it wherever your program’s API asks for it
- Use your library’s functions to send requests to the API