facebook friends

This doesn't work any more, because facebook doesn't forward along and stops at your home page after you log in.

This is a little (and very incomplete) portal to rank your friends in order of the contact in which you have in common.

  1. Make sure you have greasemonkey installed, if so skip to (2), otherwise:
    1. Install firefox.
    2. Install greasemonkey.
  2. Install the script facebookfriends.user.js. This is needed because we can't get a list of friends using the Facebook API, so we use Greasemonkey's Ajax API to do cross-site scripting.
  3. Click Show friends in common button, then you'll be sent to facebook's site.
  4. Enter your facebook login info (of course, I never see this).
  5. Click the button again and you'll see some histograms of different aspects of your contacts; here is an example.

You'll see results like this...


The way it works is that you have to first click Show friends in common, and you'll be asked to log into your facebook account then redirected back to this page. You again click the button, and then some Javascript will pull all the user ids of your friends. But, since the facebook API doesn't give access to the friends of a friend, we have to redirect to results.php, putting the the user ids in the hash (i.e. #) part of the document location, so javascript can get it, and then process all the uids in a greasemonkey script. We need to do the latter, because it allows for psuedo-cross-site scripting, and (since logged into your facebook account), we can make an AJAX call via GM_xmlhttpRequest in the facebookfriends.user.js user script and parse out the number of friends in common. Then, incrementally, we show the number of friends they have, number we both have in common and then the percentage of their's and yours that you have in common with each.