Hi all, today I’m going to tell you guys how to create a twitter bot. What is a bot. Bot is a simple computer program used to perform highly repetitive operations. You might have already seen some twitter bots but haven’t recognized them as bots. Here I’m going to create a simple retweet bot. Everything is done and you just need to get the API keys from twitter. Follow these steps to get API keys from twitter.
- Go to https://apps.twitter.com/ and create a new twitter application.
- Then go to “Keys and Access tokens” to generate required keys
- Then click on “Create my access token” and generate your access token.
Now all the hard work is done. Go to this git repo(https://github.com/rnavagamuwa/retweetBot.git) and clone this( git clone https://github.com/rnavagamuwa/retweetBot.git). Now do the following steps.
- Install dependecies. ‘pip2 install tweepy’
- Make a copy of config.json.sample to config.json
- Make a copy of textrc.json.sample
- Complete thr fields of the two json files.
- Run it or push it to heroku Run Locally `python bot.py’
DONE!!!! ENJOY 🙂
A round of applause for your article post.Thanks Again. Keep writing.