X
Business

Here's how Facebook keeps track of who you are stalking

Whenever you search for someone on Facebook, the social network seems to order your friends in a very specific way. It turns out the company is paying close attention to who you are Facebook stalking.
Written by Emil Protalinski, Contributor

While searching for ways to make the search auto-complete faster on his own website, developer Jeremy Keeshin looked to Facebook, which does this very quickly indeed. Keeshin accidentally stumbled on a file called first_degree.php, which reveals that Facebook has a ranking for the people whom you search for on the social network.

Keeshin wrote a bookmarklet for your browser that presents you with a list of people you search for most often on Facebook. This is the data that Facebook uses to predict who you're searching for when you type names into the search field.

To install the bookmarklet yourself, go to TheKeesh and drag the image or the text link "Facebook Friends" (the image didn't work for me on Chrome but it might for you) to your bookmarks bar. Then go to Facebook and click on the bookmarklet you've just installed.

The list contains your Facebook friends' names and the ranking Facebook has assigned to each one based on how you interact with them on the social network. The names at the top are those whom you search and interact with most often – the more negative the number associated with a given Facebook friend, the more you've been Facebook stalking them.

The bookmarklet works by creating a script element on the page and grabbing a JavaScript file from Keeshin's blog. This file in turn makes a request to the first_degree.php file with the correct parameters, and then displays the results formatted on your page.

The ranking algorithm is based on multiple metrics. Here are a few I came up with off the top of my head: whose Facebook profile you look at, whose Facebook Wall you post on, whose Facebook statuses and other postings you comment on, who you Facebook Chat with, who you are in the same Facebook Group with, who you attend Facebook Events with, and so on.

When you do any of these things, you are only influencing your own search results on Facebook. It's only a one-way street: nobody else can see this data unless they are logged into your Facebook account and run the script.

I've contacted Facebook to find out more about the file in question. Let's see how Facebook reacts and how long Keeshin's bookmarklet will continue to work for.

Update: "The information this bookmarklet provides can already be found in a number of places in the logged-in experience," a Facebook spokespersons said in a statement. "For example, it's used to rank the stories you see in News Feed or to suggest friends when you start typing a name for a tag. Only you can see it when logged in to your own account, and the list is determined by your behavior, and not by anyone else's. We recommend that people not run this kind of third-party javascript while logged in to Facebook, as it could enable a malicious party to hijack their Facebook session and take actions without their permission."

See also:

Editorial standards