Subscribe to our mailing list

* indicates required

Friday, February 13, 2009

A script to add Unfollow buttons to

I've mentioned on Twitter that I have been working on a bunch of Twitter scripts (I'm up to a dozen so far) designed to do different things, running either from Greasemonkey or within OpenOffice. One of the scripts I wrote is something called AddUnfollowButtons (source code here).

Call me old-fashioned, but I still use quite a lot (rather than a special Twitter client) to view tweets and add followees. I'm always adding new follows, checking them out for a while, then unsubscribing the ones that spend too much time talking about their pet canary or whatever. Trouble is, it's easier to follow someone than to unfollow them, and my "following" list (people I follow) gets bigger and bigger, but hardly ever smaller.

When I'm deciding whether to follow someone, I inevitably navigate to that person's page and check out that person's last 20 or so tweets. If I like what I see, I click the Follow button, then head back to my home page.

But when I want to stop following someone, I usually know immediately. I don't need to navigate to the person's home page and check his or her last 20 tweets, because I've already seen enough of that person's tweets on my own home page to know I don't want to follow them any more.

So I needed some way to "unfollow" people one by one on my timeline without leaving the page. I decided to try to write a Greasemonkey script to do that. And it works!

The script puts an "unfollow" button under each user-thumbnail beside each status update. All you do if you don't want to follow that person any more is clilck the button. The script does an AJAX call to Twitter (per the Twitter REST API) and removes that person from my "following" list, then refreshes the page. (It doesn't have to refresh the page ... this is AJAX after all ... but I want it to, so I can see my "following" count decrement -- and wipe the page clean of that person's tweets.)

Let me know if you like the script, and if you modify it, point me to the new version so I can try it out.

Please note
that you need to insert your own Twitter username and password in the code if you want to avoid a credentials challenge at runtime. (I've clearly commented the line where you need to do this. It's about two-thirds of the way down.)

Retweet this.


  1. This greasemonkey script doesn't seem to be working anymore...

  2. Auto Tweet Generator Software!

    Autopilot Twitter Marketing Just Through One Software!

    Tweeting When You're Away From Your Computer Has Never Been Easier!

    "Discover How This Twitter Schedule Tweets For You On Autopilot Mode"

    Sit Back And Relax And Give Your Twitter Followers Valuable Content
    While You're Away.... That'll Turn Them Into Raving Fans..

    -> Manage your Twitter postings and schedule multiple posts in just seconds easily!

    -> Set the time, edit and import messages in just a few clicks of a button!

    -> Think about the time saved on making changes without having to log into Twitter!

    -> Twitter marketing made easy because you can track your tweets through one software!

    -> Gain rapid exposure through Twitter without having to physically be involved in tweeting all day!

    -> It automatically submits your messages to Twitter while you focus on more pressing matters!

    If You Can Click, Copy, and Paste, You Can Use "TwitterBuzz Auto Tweet Generator!

    So go ahead! and Click Here to Download Your Software immediately...

    Auto Tweeter Bot

    Tweet Automator

    Automated Twitter Tool

    An Automated Tweeting Solution

    Automatic Tweet

  3. Writing your dissertation is never easy, even for the most experienced and learned academics. Firstly, you have to complete mandatory PhD-level courses and pass exams before even starting on your dissertation.

  4. Anonymous3:11 PM

    of course like your website but you need to take a look at the spelling on quite a few of your posts.
    Several of them are rife with spelling issues and I in finding it very bothersome to tell
    the reality then again I'll surely come again again.

    Also visit my homepage: sbobet judi bola


Add a comment. Registration required because trolls.