a GreaseMonkey script for Follow Rank and Follows in Common for Twitter User Profiles

I’ve released a GreaseMonkey script Follow Rank and Follows in Common for Twitter User Profiles which you can use to display the Follows in Common and the Follow Rank for a given users profile page and discover how important they are in your Twitter Social Network.

Similar in aim to FaceBooks “friends in common”, adjusted to reflect twitter’s asymmetrical following as opposed to FaceBooks symmetrical Friending. i.e. in Facebook we both have to agree to be “Friends”, but it Twitter it only takes one of us to follow the other, following back is optional.

It order to use this script you need to have the GreaseMonkey extension installed, add the script, and then go to a users profile page on Twitter.com, like Robert Scoble‘s twitter page, (or Ashton Kutcher‘s!)

FollowRank tells you how many, and which, of the people you follow are also following Robert Scoble (or Ashton Kutcher).

Follows in Common tells you how many, and which, of the people you follow are also followed by Robert Scoble (or Ashton Kutcher).

If you look at your own profile you will see a) 100% Follows in Common, b) How many of the people you follow who follow you back!

Robert Scoble with Follow Rank and FiC GM Script

Notice the small gray down arrows? (This is visible if the result is none zero.) Clicking on the text line will reveal the avatar picture of the people who contribute to the score. Hovering over the picture will show their name and clicking on it open their user profile page (and compute their Follow Rank and Follows in Common).
Robert Scoble with Follow Rank and FiC GM Scrip showing People
Clicking on the text line a second time (see the small gray up arrows?) will collapse the view of Follow Rank or Follows in Common user avatar’s. The data is cached so reopening the view is super fast.

So Why Follow Rank?

This information lets me know this persons relevance and weight in my social network, the people I have choicen to follow (my first Order Social Network in Twitter).

It lets me know, quickly, why they discovered me, or why I might follow them.

How am I doing this?

All JavaScript, using the Twitter’s API calls for their Social Graph Methods (Twitter REST API Method: friends ids and Twitter REST API Method: followers ids), lots of caching of results (but only for a period of time using my aged Cache function – persistent, but not too persistent!! ) to get around the Twitter throttle limit (currently ~150 requests per hour limit, see Rate limiting), and lots of JSON AJAX calls of those api calls. Plus, taking advantage of Twitters.com’s use of jQuery on their web pages, their own plug-in’s and css and images. Easy!!

What’s next

There is still work to be done and features to be added add to the GM script (LiC : Lists in Common?), and then to go beyond what can be done in a GreaseMonkey script!

I’m thinking of exposing your 2nd order Twitter Social Network : Who are the people being followed by the people you follow? What’s their Follow Rank? Also, who of them follows almost the same people who follow?

I think this would make a organic “Suggested Users List”, personalized just for you because it based on your social network.

Now do that for your -1 & -2 order networks.

Plus sorting (by alpha, by Follow Rank, by FiC), and searching of all that.

This will keep me busy! Whatcha think?

One Reply to “a GreaseMonkey script for Follow Rank and Follows in Common for Twitter User Profiles”

  1. A few suggestions on staying withing the rate limit:

    * Instead of getting the entire list of friends and/or followers, get the first batch from one API call, then prompt the user to load more (either actively with a popup or passively with a “more” button on the page). Continue to prompt the user after each batch. This way the user is in control of how many API calls they use.

    * When getting user details, use the statuses/friends and/or statuses/followers instead of calling users/show for each user ID. You get details for 100 users for each API call.

    * You may not even need to show details for every user. Twitter only shows at most 36 followers on a user’s profile page; any more and it becomes a giant sea of thumbnails. Perhaps your script should also limit details to 36 users.

    * For the 36 followers shown on the profile page, you don’t need API calls to get their details; you can parse the page / walk the DOM to get that information.

    * You may be able to use statuses/friends and statuses/followers instead of friends/ids and followers/ids (respectively); I’m guessing most users don’t have more than 100 friends or 100 followers. That way you get the list and the user details in one call. Perhaps you can get the number of friends or followers (from users/show), then decide which method to call.

    * Call account/rate_limit_status before starting any large number of API calls. You can get the number of friends or followers, then estimate the number of required calls. Make the calls only if the user will stay within the limit.

    HTH,
    Jeff

Leave a Reply