Skip to content
Social Media Twitter Bot
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Social Media Twitter Bot, see me running at

Getting Started

Fill in the info from your Twitter Development App from in TwitterConfig.json

"Twitter-Keys-And-Tokens": {
	"CONSUMER_KEY"    : "xxxxxxxxxxxxxxxxxxxxxx",
	"CONSUMER_SECRET" : "xxxxxxxxxxxxxxxxxxxxxx",
	"ACCESS_TOKEN"    : "xxxxxxxxxxxxxxxxxxxxxx",
	"ACCESS_SECRET"   : "xxxxxxxxxxxxxxxxxxxxxx"

Run The Twitter Bot

There are a few variable definitions to decide in, edit it, then execute it with python3

import TwitterBot

MIN_FOLLOWERS = 16000  # Sanity check on number of followers
MIN_FOLLOWING = 16000  # Sanity check on number following
STAT_DIR='/var/www/' # Directory to write statistics
LOG_DIR ='log'                                     # Directory to write logs

print('TwitterBot - Running...')
twitterBot = TwitterBot.TwitterBot(logDir=LOG_DIR,statDir=STAT_DIR),minFollowing=MIN_FOLLOWING)
print('TwitterBot - Complete...')

Twitter IDs to Always Follow

To make sure you never unfollow someone, add them to TwitterConfig.json as IDs. search Google to convert a Twitter Screen name to a Twitter ID

"Twitter-Follow-List": [
		"Description": "The Squad - AOC",
		"Id": 138203134
		"Description": "The Squad - Rashida Tlaib",
		"Id": 435331179
		"Description": "The Squad - Ilhan Omar",
		"Id": 783792992
		"Description": "The Squad - Ayanna Pressley",
		"Id": 31013444
You can’t perform that action at this time.