Skip to content

A Python bot that automates several actions on Twitter like replying to tweets.

License

Notifications You must be signed in to change notification settings

yeshapatel356/Twitter-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Twitter-Bot

A Twitter-bot is a program that integrates with the Twitter platform automatically by replying to tweets. It created using Python script and Tweepy library.

Set Up

  1. To use Twitter bot,you need to have Python 3 installed on your system.
  2. This bot uses tweepy module.You can install tweepy by using pip. To install tweepy, use this command :
 pip install tweepy
git clone https://github.com/tweepy/tweepy.gitcd tweepypython setup.py install
  1. Next, we need to link our Twitter account to our Python script. Go to Twitter Developer 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 statements store your credentials within variables and then use the second block of code to authenticate your account with tweepy.
CONSUMER_KEY = 'XXXXXX'
CONSUMER_SECRET = 'XXXXXX'
ACCESS_KEY = 'XXXXXX'
ACCESS_SECRET = 'XXXXXX'
auth = tweepy.OAuthHandler(CONSUMER_KEY,CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY,ACCESS_SECRET)
api = tweepy.API(auth)

In order to check if your program is working you could add:

user = api.me()
print (user.name)

This should return the name of your Twitter account in the console.

Run

Holabot.py

About

A Python bot that automates several actions on Twitter like replying to tweets.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages