How you can use Facebook to track your friends’ sleeping habits
Like most of my friends, I use Facebook on a daily level. I use the website, the Facebook app, and the Messenger app. It should come as no surprise, that Facebook keeps track of every time you visit them through any of those means. The creepy thing is, that your friends can keep track of this too.
Last year Facebook launched messenger.com — a web-based version of their Messenger app.
In the web-based Messenger, it is possible to see when a user was last active:
I was curious about where this data was coming from, and after some digging found this — a list of user ids and timestamps of last activity :
The above can be loosely translated to:
— Peter was last active on Feb 21 2016 15:34:25.
— John Doe was last active on Feb 21 2016 17:15:11.
— Elizabeth was last active on Feb 21 2016 10:09:55.
…and so forth
By creating a simple service that checks Facebook every 10 minutes, I’m able to get an accurate picture of my friends’ Facebook usage. Many people visit Facebook as the first thing in the morning, and the last thing before going to bed. It is therefore possible to get a good impression of their sleeping habits (or lack thereof).
Source code available on Github
I’ve published the source code here. By cloning it you can run the service locally, and you will start seeing the sleeping patterns of your friends.
Moral of the story: We cannot hide
Everybody I’ve shown this to have been equally fascinated and outraged by the accuracy with which it predicts their sleep habits. In this digital world we leave footprints where we go, and when we do it, without even thinking about it. Facebook might block this little “hack”, so your friends no longer can track you, but Facebook will always be able to do their own data analysis which is undoubtably way better than what I’ve come up with. They are likely using this data for profiling, and creating more user-specific ads.
 “lastActiveTimes” is embedded in the initial markup of messenger.com. Simply go to www.messenger.com and click “View Source” to see for yourself.