Python script that lets you tweet straight from your code editor because I literally never want to log into Twitter again lol. I might tweak this to be able to upload media at some point
- Create and set up a Twitter Developer account and get your API key and consumer secret. Here are some good instructions.
- Make sure your Python version is up-to-date and then install tweepy in the command line with pip install tweepy.
- Clone this repo into whatever folder you want – you won't need to run this from the terminal so it doesn't really matter which.
- Place your API and client keys in a config.py file, making sure to name the variables the same as the ones in the tweet_poster.py file. I highly recommend adding the config file to a .gitignore.
- In the update_status function write out whatever tweet you want.
- Run the code straight from your text editor and check if the tweet posted. Yay :)