Contact: (801) 853-8339 or jesse@staynalive.com
Twitter, FriendFeed, LinkedIn, or Facebook
Like StayNAlive.com on Facebook!:
TwitterCounter for @Jesse

Auto-Follow Those that Follow you on Twitter

On Twitter, it is generally polite to follow those that follow you – they are saying, “you are interesting”, so it is the polite thing to show interest in them as well. I have heard from multiple people, including Scoble and Chris Pirillo that they have requested Twitter do this for them.

Well, I’m proud to announce that I’ve written a script that does just this for you. It’s a simple script, that does just what it says it does – auto-follows those that follow you. To install the script, download this script, unzip it (gunzip), then edit it. You’ll need to specify your Twitter username and password in the specified places, and if you want to blacklist any screen-names you’ll want to add those in as well. Then, add the script to a cron job somewhere, say, in cron.hourly or cron.daily, and it will now auto-follow anyone that follows you on Twitter! If you get any bologna (as I call it – others call it bacon) followers, you can simply add them to your black list in the script and it will ignore them.

If you have any problems installing it or running it, please comment. This script is being released under the GPL, v.1. Again, you can download the script at:

http://www.jessestay.com/auto_follow.pl.gz

I’ll post it to CPAN later as I get time so it can be downloaded there.

UPDATE: you’ll need to have Net::Twitter installed – you can install this by running “perl -MCPAN -e ‘install Net::Twitter’”

UPDATE (11/14/2007): Chris Pirillo has pointed out that it’s hitting an API limit if you have to follow more than 70 users within the same hour. If that is the case, set it to run on cron every hour, and eventually it should catch up. Twitter can also add your username to a white list if this is important to you and contact them. If you are on that white list, it should follow everyone in one swoop.

  • this is a great read, very informative
  • vilesyntax
    very interesting... i can use this along with my other projects over @ http://www.vilesyntax.com
  • Can't locate object method "follow" via package "Net::Twitter" at auto_follow.pl line 32.

  • kaz
    i have the same issue... does anyone have more infomation on this?
  • Ryan
    Hi did you ever fix the issue "Can't use an undefined value as an ARRAY reference at ./auto_follow.pl line 26."?
  • Ryan, I've deferred most of the work on this over to my site, SocialToo.com,
    which will do all of this for you.
  • i use tweelater for this..!!!
    :)
  • paranoid - with Tweetlater you have to set up e-mail rules to do it.
    This requires no configuration on your end - it does it all for you,
    nothing you have to do. Tweetlater also does not track unfollows.
  • SocialToo.com doesn't work at all. with a www. in front of it or not.

    what's another suggestion?
  • Gypsy, please try it again. We were having DNS issues earlier today, but
    they're fixed now.
  • The link is work now. BTW, is this premium service and we have to pay ?
  • It's free right now - it will be freemium in the future, meaning most of it
    will remain free, with some paid upgrades.
  • Do you have zip version for download? thanks :)
  • Jerry, for now I suggest just signing up for SocialToo.com - it takes
    care of it all for you. I'll be releasing another version of this
    that is much more updated soon, which I'll provide a zip version.
  • Benjamin, unless you're set on running it on your own computer, I suggest just signing up for SocialToo.com - I've implemented it on a multi-user scale there and you can also blacklist users and do other stuff, including stuff on Facebook. If you like it, tell your friends about it!
  • Ronald Wiplinger
    $ ./auto_follow.pl
    Can't use an undefined value as an ARRAY reference at ./auto_follow.pl line 26.

    What gone wrong?
  • The Net::Twitter library has issues right now - I would recommend just
    signing up at http://socialtoo.com and let it take care of that for
    you. I'll release an updated version of the code here as soon as I
    get a chance.

    Jesse
  • OK, I must be an idiot. I installed Net::Twitter and I get a install OK on that. When I drag the auto_follow.pl in to my terminal I get a 'command not found' with it (using sudo as well). What am I missing here? It has to be something simple.
  • sorry - there's a bug there - you have to go to http://www.socialtoo.com (notice the www). I'll get that fixed soon...
  • Eli
    Hey Jesse - Thanks for the quick response!

    I was able to grab the download this time, but as per your socialtoo.com, that site seems to be down instead.

    (en) Please come back later
    (fr) SVP veuillez revenir plus tard
    (de) Bitte versuchen sie es spaeter nocheinmal
    (at) Konnten's bitt'schoen spaeter nochmal reinschauen
    (no) Vennligst prov igjen senere
    (dk) Venligst prov igen senere
    (pl) Prosze sprobowac pozniej
  • Eli, try it again. You might also want to try socialtoo.com - I take all of the hard work out of it for you by doing it all for you there.
  • Eli
    I think your download link may be down. I'm really looking forward to seeing how this is accomplished. thanks for your contribution, and best of luck with your projects.
  • compassioninpolitics

    Giving people the benefit of the doubt makes a ton of sense.


    I know I'm more willing to listen to folks who follow me. Folks that one way twitter are terribly frustrating. (as are people who try to spam 4,000+ people) When Guy Kawasaki finally decided to follow me after a month or two of not doing so, I know I'm going to be visiting his blog much more often.


    Hat tip and props to Creative Sage for bringing me over to this post from Twitter.

  • Chris, you need to install Net::Twitter for perl. You can do that by entering the command above:


    perl -MCPAN -e 'install Net::Twitter'


    Please feel free to comment or e-mail me if you have any more issues.

  • Can't locate Net/Twitter.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at ./auto_follow.pl line 3.
    BEGIN failed--compilation aborted at ./auto_follow.pl line 3.

blog comments powered by Disqus