Sometimes I don’t like Facebook. For instance, I’ve never understood why they basically force you to display your active times on Messenger (to all your friends). This is typically the kind of sneaky behavior I wish never existed.
To show the entire world how easy it is for any of your friends to track your Messenger activity, I wrote a small Python script that calls Selenium, logs into my personal Messenger account every 10 minutes, and records the last active times of my friends. The data is stored locally in a JSON file. The full code is available on GitHub.
Disclaimer: Let’s be clear: I do not encourage personal use of this tool. I have decided to publish it for educational purposes only. Most of my friends and family are simply not aware of how much of their private information is being shared online without their knowledge. As such, the goal of this utility is certainly not to spy on your friends but to raise awareness about privacy concerns on Facebook.
I ran this script for one full week, then I analyzed the results. And I shared them with some of my friends who were interested in seeing their own logs. For instance, viewing her log helped my sister estimate how much time she spent on Messenger daily, and gave her fairly accurate information about when she went to sleep and woke up! It even make my little sister decide that she’d have to reduce the time she spends online on Messenger, which is a prowess in its own right.
Now let’s have a look at the anonymized log of one of my Facebook friends:
On this example, you can guess that the person goes to sleep around 11pm on weekdays, and she seems to have a habit of being active around 3am. She is generally active for 1-2 hours per day. This last estimate I built from the information I scraped every 10 minutes, so it should be taken with a grain of salt.
In this post I have shown how easy it is to track your friends’s online Messenger activity. Given that many people check Messenger just after waking up and just before going to bed, this should give direct access to their sleeping habits. I have no idea what Facebook is doing with this data, but I can only imagine…
I certainly am not the first person to think about this. In 2016, Danish software developer Søren Louv-Jansen built a similar tool (with a more elaborate graphical interface), and then published an article about it.
What can you do to prevent this? First, and this may seem like an obvious recommendation, but it helps to only have people who you really know as Facebook friends. Secondly, it turns out that there are ways to hide your activity, at least when you are using a computer (e.g. the Chrome extension Unseen ). For an iPhone user, following the steps here might work, but I have not been able to confirm them by myself. That being said, there may be ways to tweak your phone’s internet settings and block the Facebook URLs used to send the activity requests, but I’m not aware of any simple way to do this (and certainly not on an iPhone). The most effective solution may well be… to stop using Messenger altogether.