A twitter bot that talks back to you when you tweet at @karmanishth with the substring #buzz.
A twitter bot that talks back to you when you tweet at @karmanishth with the substring #buzz
.
- Python3.7, pipenv
- Django 2.1
- Tweepy
- Assuming you have pipenv installed, (if not, run command --
$pip install pipenv
) - cd inside the project directory
- Run command --
$pipenv install
- Now run the server by running command --
$python3 manage.py runserver
- If you login to your local server now, you should be able to see a message saying
BOT ACTIVE
.
PLEASE NOTE: I have not committed the twitter_keys.py file to master due to security reasons. This file goes in the /twitter/ directory as twitter_keys.py and has the following attributes that I extracted from my twitter account.
'CONSUMER_KEY = <>
CONSUMER_SECRET = <>
ACCESS_KEY = <>
ACCESS_SECRET = <>'\
If you need to replicate the environment with my keys, feel free to drop a pull request and I will be happy to connect with you over the same.
- Log in to your twitter account
- Write a tweet to @karmanishth, make sure you have the keyword #BUZZ (any case) in your tweet.
- Within 30 seconds of you tweeting, the bot talks back to you in tweet
I am not keeping the bot server active 24x7. Although I do strive to keep it always active but sometimes its just sleeping so sorry for that. It will tweet back whenever it comes back up though