Free Twitter Bot

In this guide I will show you how to setup and run a free twitter bot. This bot uses python library for twitter. It can automate several actions on Twitter, such as following users and liking tweets. All you need to do is just run few python scripts.

Here’s step by step guide how to run it.

1.

Go to https://www.python.org/downloads/windows/ and download python installer based on your operating system. In my case it’s 64bit win7.

1

Run and install downloaded file. Make sure to check “Add python to environment variables”.

2

2.

Go to https://github.com/rhiever/TwitterFollowBot click “Clone or Download” -> “Download ZIP”

3

3.

Extract downloaded archive. Copy extracted folder to preferred location. In my case c:\. Rename it to easier name, like twit.

4

4.

Go to http://pip-installer.org/ and click “Installation”. Download file get-pip.py and run it.

5

6

5.

Run command promt (start->run->cmd) or power shell in windows 10.

type “c:\twit” hit enter. (c:\twit is where we copied downloaded bot files).

type: “pip install TwitterFollowBot”

type: “pip install Twitter”

8

6.

Go to https://dev.twitter.com/apps and login with your twitter account.

Click “Create New App”. Fill in title, description, website and click “Create your twitter application”.

9

Go to “Keys and Access Tokens”. Click “Create my access token” at the bottom.

Go to “permissions”. Make sure “Read and Write” or “Read, Write and Access direct messages” is selected.

Click “Update Settings”

In “Keys and Access Tokens” tab you will authorization keys needed to configure bot.

7.

Go to bot directory (c:\twit) and open config.txt file.

Enter required information from “Keys and Access Tokens” tab.

10

Twitter handle is your twitter display name (case sensitive).

Create new text file named “Follow.py” and copy script into it.

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot() 
my_bot.auto_follow_followers_of_user("JohnDoe", count=1000)

Save the file and copy it to c:\twit.

Run it by double clicking.

11

That’s it. This script will follow 1000 followers of “JohnDoe”.

Be careful not to follow to many people. No more than 1000 per day or twitter may block you account. New users should go only with 100 a day.

8.

Here’s some more scripts.

Syncing your Twitter following locally

Due to Twitter API rate limiting, the bot must maintain a local cache of all of your followers so it doesn't use all of your API time looking up your followers. It is highly recommended to sync the bot's local cache daily:

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()
my_bot.sync_follows()

Automatically follow any users that have followed you

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()
my_bot.auto_follow_followers()

Automatically favorite any tweets that have a specific phrase
from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()
my_bot.auto_fav("phrase", count=1000)

Automatically retweet any tweets that have a specific phrase

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()
my_bot.auto_rt("phrase", count=1000)

Automatically unfollow any users that have not followed you back

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()
my_bot.auto_unfollow_nonfollowers()

 

If there are certain users that you would like to not unfollow, add their user id to the USERS_KEEP_FOLLOWING list.

You will need to manually edit the code if you want to add special users that you will keep following even if they don’t follow you back.

Automatically unfollow all users.

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()
my_bot.auto_unfollow_all_followers()

Automatically mute all users that you have followed

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()
my_bot.auto_mute_following()

You will need to manually edit the code if you want to add special users that you will not mute.

Automatically unmute everyone you have muted

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()
my_bot.auto_unmute()

You will need to manually edit the code if you want to add special users that will remain muted.

Post a tweet on twitter

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()
my_bot.send_tweet("Hello world!")

Automatically add users tweeting about something to one of your list

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot()
my_bot.auto_add_to_list("#TwitterBot", "twitterbot-list", count=10)

In the example above, the bot will try to add 10 users to the twitterbot-list that are tweeting #TwitterBot.

Remember that the max number of users in a list is 5000.

 

 

 

 

 

 

 

Loading Facebook Comments ...

Leave a Reply

Your email address will not be published.