This is a fun little project for me to get acquainted with twitter API through use of tweepy
. In addition to this, I gain experience in deployment using Docker and Amazon EC2 instance and a Digital Ocean droplet.
The objective is to create a bot that favourites and retweets Optometry related posts on twitter.
Here is a blog post related to motivation and inception of the bot. Though this blog is slightly outdated.
This requires creating your own requirement .env
file and authenticated access for a bot account through https://dev.twitter.com.
The .env
file is used to contain the environment variables, which will house the API keys and tokens. The file is structured as follows:
APIkey=<API Key>
APISecretKey=<API Secret Key>
BearerToken=<Bearer Token>
AccessToken=<Access Token>
AccessTokenSecret=<Access Token Secret>
This requires
pipenv
docker
anddocker-compose
- Any python 3.8.10
If you have any feedback, please get in touch with me.