≡ Menu

Make a Twitter Bot which automatically Retweets a particular Hashtag

twitterbot In this post, I’ll show you how to make your own twitter application (bot) which automatically retweets a particular hashtag which appears in its timeline.To make this application you don’t have to be a geek nor write a single line of code by yourself.

What does this Hashtag Retweeter Twitter Bot do ?

This Twitter bot constantly checks tweets in its timeline for a particular hashtag and then retweets that tweet when found. It can be used to create a twitter group or a bot which lists all friends coming for a tweetup.

Also read : Twitter hacks for better tweeting

How to Make Retweeter Twitter Bot in 5 minutes

Download the core file Retweeter (thanks, John Eckman)

Extract the zip file to your hard disk.

Log into your webhost and create a database. (Use the database creation wizard from cpanel)

Open readme.txt file and use the sql code to create tables named "log" and "tweet."  [Import the sql code in phpmyadmin panel]

Create a twitter username same as the hashtag you want to retweet.

Open up Retweeter.php file (which you extracted before) with a text editor like WordPad or similar and fill in your database connection details.Also enter the twitter bot’s username and password.

twitter bot retweeter configuration

Upload the file retweeter.php to your webhost.

Now for the bot to work,follow everyone who’s tweet you want to search for hashtag. After you have done this, let’s add a cron job to check for hashtag in your friends timeline and retweet that tweet status.

Take your webhosts admin dashboard (cpanel) and add a cron job to run retweeter.php every 3 minutes (max is 2 minutes,remember twitter API has limits)

cron job twitter spam bot

That’s it. You have created your own twitter bot which automatically retweets a particular hashtag.

ps: please don’t use this twitter bot for spamming.

Comments on this entry are closed.

  • Sleeek October 10, 2009, 6:49 pm

    is there any way to automatically retweet post from twitter search timeline

  • Anonymous November 9, 2009, 12:43 am

    hey sleeek, I got the same problem to solve,

    you already found something?

  • Mike Panic August 30, 2010, 1:42 pm

    I want to use this with a hashtag though, not a username. Is that at all possible?