Skip to main content

Posts

Showing posts from May, 2019

Create a Twitter Bot to do the work for you using Tweepy

 I googled how to create a Twitter bot and was brought to a cleanly laid out web app. It allowed you to create a bot that would like, follow, or retweet a tweet based on a keyword. The problem was that you could only create one bot for one function. So I decided to code a bot myself with Python and the Tweepy library. Setup First, I downloaded Tweepy. You can do this using the pip package manager. pip install tweepy You can also clone the GitHub repository if you do not have pip installed. git clone https://github.com/tweepy/tweepy.git cd tweepy python setup.py install You’ll need to import Tweepy and Tkinter (for the GUI interface). import tweepy import Tkinter Credentials Next, we need to link our Twitter account to our Python script. Go to  apps.twitter.com  and sign in with your account. Create a Twitter application and generate a Consumer Key, Consumer Secret, Access Token, and Access Token Secret. Now you are ready to begin! Under your import ...