Skip to navigationSkip to content
Reuters/Dado Ruvic
There’s always someone watching.
CREEPY CODE

There’s a Facebook hack that lets you track your friends’ sleeping habits

Akshat Rathi
By Akshat Rathi

Senior reporter

We all know Facebook lurkers—users who rarely post but use their account to creep around on the social network and spy on friends.

Now the lurkers have a new tool. A Danish software developer has released code, which can be used as a proxy for sleeping habits that anyone can use to track their Facebook friends.

The simple hack takes advantage of a loophole in Facebook’s Messenger. The developer Søren Louv-Jansen writes on Medium that snippets of code on Messenger.com reveal when a user in his network was last active.

“lastActiveTimes”: { “3443534”: 1456065265, “675631492”: 1456066386, “8657643”: 1456062331, “255277634”: 1456052450, “6423324”: 1456065173, “235323452”: 1456065096, “3265233223”: 1456066381, “2432885644”: 1456064016, “7464340313”: 1456062500 }

That code is a list of user IDs and the timestamp of their last activity. Louv-Jansen writes:

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

Frequent users of Facebook often check the site before going to bed and soon after waking up. (A 2013 survey revealed that nearly 80% of smartphone users reach for their phone within 15 minutes of waking up.) Louv-Jansen’s code checks Facebook every 10 minutes for the timestamp of their last activity to create a visual map of a user’s circadian rhythms.

The code Louv-Jansen released wasn’t to spy on his friends. “I want people to be aware that they’re leaving some digital footsteps everywhere they go,” he told the Washington Post.

Facebook’s Messenger app, which has more than 800 million active users, is not the only one that tracks when a person was last active. WhatsApp does it too, and it has more than 1 billion users.

“People should be aware whatever they do, they’re not alone, someone is always watching,” Louv-Jansen told the Washington Post. “I don’t want to say that Facebook is evil. This is just a side effect of what they’re doing.”

Subscribe to the Daily Brief, our morning email with news and insights you need to understand our changing world.