13 ms·
Graphing when your Facebook friends are awake
- aham 11y agoThis is brilliantly creepy, and so well written as to be both engaging and informative. Thanks!
- jordan801 11y agoLove it. I knew where you were going right off the bat, but your writing made me read through it. Now I feel like a secret agent. I'm not sure why.
- merb 11y agoNot sure if this blog post is great because of the thing he is doing or the way he writes it.
- enig_matic7 11y agoSo, I can mine when my friends are online. Perhaps, buy some targetted ads about 'SleepCycle' and show them to the naughty ones who sleep less than 6 hours. :P
- deleted 11y ago[deleted]
- WilliamSt 11y agoYou should try to add some sort of tracking of when people start to write a message to you. If that's in any way possible. It would be really stalkery if you knew whenever someone started writing a message and perhaps decided not to send the message.
- theon144 11y agoI know I'm in the minority here, but I just couldn't bear the writing style. I'm sure the content is interesting, but this article tries way too hard for my tastes. I had to give up after the first couple of paragraphs.
- soofy 11y agoAnother neat FB analysis: Data Science of the Facebook World http://blog.stephenwolfram.com/2013/04/data-science-of-the-facebook-world http://blog.stephenwolfram.com/2013/04/data-science-of-the-f...
- brightball 11y agoGreat writing style. Hilarious.
- Globz 11y agoVery good and fun to read article. Thanks for all this amazing info! peace - [2edgy4u][ev REE DAI][24x7BLAZEIT]|ggg10Bzzz|
- meapix 11y agoI don't have facebook but my friends are on facebook.
- karlding 11y agoYou used to be able to do this with the Facebook Query Language (FQL) that Facebook exposed, sending something like this query to the FQL endpoint. SELECT uid, name, online_presence FROM user WHERE online_presence IN ('active', 'idle') AND uid IN ( SELECT uid2 FROM friend WHERE uid1 = me() ) Unfortunately, the current version of the Facebook Graph API[0] doesn't have the online_presence field, so this is no longer possible. Maybe the Graph API will be updated in the future to also return the online_presence fields? [0] https://developers.facebook.com/docs/graph-api/reference/v2.5/user https://developers.facebook.com/docs/graph-api/reference/v2....
- AznHisoka 11y agoDoes this work for anyone, even if you're not their friend?
- bertil 11y agoI would presumably work for anyone you are chatting with; that’s mostly your friends, but there are edge cases like people who asked to become your friends and haven’t accepted yet, friends of friends in a group chat, with whom you might be able to chat, etc. I haven’t tried though. If you are inclined to, I would strongly recommend you create test accounts there to do so: https://www.facebook.com/whitehat https://www.facebook.com/whitehat A. you get way funnier screen grabs, and honestly simpler controls; B. you will get love from the security engineers, which I’ve tried, and is an awesome idea.
- intrasight 11y agoOnly works in idiots who have Facebook installed on their phones
- Carrok 11y agoAs it says in the article, this returns a list of the statuses of your friends, he's not querying people individually. He is, however, storing the records individually, but that's a function of his program, not how the API behaves.
- defaultnamehere 11y agoHi, I wrote this blog post. Nope, you have to be their friend. Well, you have to be their Facebook friend. What you do in real life is none of my business.
- 542458 11y agoSome people might take issue with it, but the writing for this had me in stitches. I very much agree with the author on graphing libraries - there are a few good simple ones, but as soon as you want anything unusual you have to jump to these big, hard to configure monstrosities. More than once I've just given up and written my own server-side generator.
- NamTaf 11y agoI, too, am laughing way too much whilst at work over the writing of this.
- Lazare 11y agoI agree; the writing was excellent. The style might get old after a while, but it captured my feelings on several issues very closely. :)
- gtrubetskoy 11y ago+1 The javascript rant is epic! :)
- calhoun137 11y agonvd3 is actually really awesome http://nvd3.org/ http://nvd3.org/
- cargo8 11y agoThis was the funniest writing style since the WAT talks lol
- Symbiote 11y agoI decided the guy was British, but he's probably Australian. (His Github profile says so. Would you lie?) Lots of casual self-deprecation. I'd recommend well known comedians, but I'm no good at remembering names.
- swampthinker 11y agoWhat's striking about this writing style is that (as a junior dev) it's a lot easier to understand what he's doing. By sticking to jokes and a simple style, I never felt confused or lost in lingo.
- Matiss 11y agoThis is awesome! Thank you for sharing the code for this. Overall I would say that this could be very entertaining to watch over multiple sites. Potentially gathering a good profile of your friends over time!
- anaphor 11y agoI did the same thing with the XMPP interface before they scrapped it and it was obviously much easier...also I used the built in graphing that's in Racket to visualize it. Also I made a thing to do desktop notifications whenever someone came online, which is actually kinda useful.
- beatpanda 11y agoseriously though how are you not already using D3
- baby 11y agoThis is getting downvoted, but I really thought D3.js was the most popular library for doing that kind of stuff? I'm a bit outdated I still use gnuplot :/
- Buetol 11y agoSmall tip: If you don't want to be tracked, you can also turn off the chat.
- gry 11y agoTurning off chat doesn't necessarily suggest that is true. While `sticky_pool=atn2c06_chat-proxy&state=active` suggests the case, it's something to explore and see if there is a larger issue at hand.
- jonesb6 11y agoAlso if you aren't super prudent in turning of chat all the time, it would be trivially to notice those kind of anomalies in the graph.
- wfunction 11y agoDoesn't actually work considering Facebook shows "Active X mins ago" even if you're never "Active now" via chat.
- gohrt 11y agoWhat determines whether the app is online? What happens when the user is using the phone but FB is in the background? Does FB get some kind of update when the user is active on device? Or do OP's friend live in the FB app all day long?
- defaultnamehere 11y agoHi, I wrote this blog post. I have no idea what the Facebook apps (Messenger and the Facebook app) do in the background. It's easy to test that, but I didn't because #yoloswag
- frogpelt 11y agoYou're a funny person.
- deleted 11y ago[deleted]
- obelisk_ 11y agoinb4 facebook resolves this issue by banning anyone who's connected 24/7. (that wouldn't solve the problem either way, btw -- a small group of people could conspire to pull this data at irregular intervals and then share the data with one-another to get a more complete picture while still staying reasonably undetectable if done right.)
- defaultnamehere 11y agomfw banned
- auscompgeek 11y agoso this is why I always get disconnected from Messenger!
- a_bonobo 11y ago>Similarly, I’m not sure why there are these weird spikes every three minutes (+- ~1minute) sometimes. Could these just be keep-alive requests? For example, the mobile app checks whether it's still connected?
- defaultnamehere 11y agoGood point! I didn't think of that. 3 minutes does seem like the kind of time an engineer would code into their app. So does that mean that the spiky periods are times when people are online the whole time?
- a_bonobo 11y ago>So does that mean that the spiky periods are times when people are online the whole time? I'd be inclined to think so, but I don't work for Facebook, there may be an entirely different reason :) Edit: or maybe, maaaybe, it's the point of time when people fall asleep over their mobile - they've stopped interacting with the app, it still sends a few keep-alive requests, and then logs itself out.
- josh2600 11y agoCould it be an unusual client, like a microsoft phone or something?
- davidwparker 11y agoNice little investigating! Personally, I have chat off all the time on FB, and I don't have the Messenger (or FB) app on my phone either, so I guess I'm always sleeping :)
- spydum 11y agoI like to do this sort of web spelunking all the time.. But the writing and humor really make this more enjoyable than it should be! Of course Facebook leaks info to you about your friends - that is the sole attraction for people to use it! Seems like you could turn this thing into a browser extension as well if you felt daring.. Like some sort of FB snooper.
- giancarlostoro 11y agoYes the author seems to have a bit of fun with what he does.
- gengkev 11y agoI don't have a Facebook account, but is there really no way to not share your available status to your friends? In Gmail you can simply sign out of Hangouts. On a side note, > If you’re wondering why the response starts with “for (;;);”, it’s to, among other things, encourage developers to use a quality JSON decoder, instead of like, y’know, eval(). This is wrong, as I commented on the linked StackOverflow post, perhaps a bit too strongly. But it's really frustrating to see that people have misconceptions because of incorrect answers on StackOverflow.
- defaultnamehere 11y agoDammit, I trusted that StackOverflow answer T_T
- Fogest 11y agoYou can just turn chat off: https://www.facebook.com/help/www/215888465102253 https://www.facebook.com/help/www/215888465102253 Any messages you get when your chat is off just go to your Facebook inbox so you can still get messages even with it off you just kinda lose that online live kinda element. I mean this works just like most chat applications work. They basically all say you're online or not too.
- aiiane 11y agoYou don't even have to sign out of Hangouts - Hangouts has an option to not display "last seen" status which will make you always appear offline (though you can still send and receive messages).
- baby 11y agoIf you don't link to your answer many people are just going to discard your comment.
- notliketherest 11y agoYou sound pretty neurotic
- buremba 11y agoIt would be real creepy if someone does the same thing for Whatsapp, you can even predict who's talking to each other much better than Facebook. It's a bit harder to collect data from web.whatsapp.com because it's using Websockets but let me know if someone develop such tool and publish it on Github. :)
- mattlutze 11y agoThere was a capability to do this, at least last year: https://nakedsecurity.sophos.com/2015/02/17/whatsapp-spy-tool-lets-anyone-track-when-youre-online/ https://nakedsecurity.sophos.com/2015/02/17/whatsapp-spy-too...
- thewarrior 11y agoI've done it. Just embed a javascript on to the web.whatsapp.coom page that tracks when the div says online. It works quite well. There are even better ways which I'd rather not reveal.
- cavDXF 11y agoYou mean something like this? https://gitlab.maikel.pro/maikeldus/WhatsSpy-Public/wikis/home https://gitlab.maikel.pro/maikeldus/WhatsSpy-Public/wikis/ho...
- buremba 11y agoYep, I searched on Github but couldn't found. Using Gitlab makes sense considering Github is strict about legal issues.
- jonesb6 11y ago"If you I dunno, didn’t have a lot of friends in high school, you might recognise that as a UNIX time stamp - the time in seconds since midnight, January 1, 1970. " Great article. And a further reminder why Facebook kinda sucks.
- givehimagun 11y agoWhy does unix timestamp imply that Facebook sucks?
- MichaelApproved 11y agoNot sure if you're seriously asking but OP was likely saying it's a great article because of the witty writing. The remark about FB sucking was related to the article's substance.
- xiphias 11y agoSo to make it useful it just needs to find the pairs of people who ,,go to sleep'' at the same time
- yojoma 11y agoThis was hilarious and really cool!
- yojoma 11y agoThis was hilarious and really cool!
- yojoma 11y agoThis was hilarious and really cool!
- Wingman4l7 11y agoReminds me of the old-school user tracker (whose name escapes me) that would give you a bar graph of your friend's online/offline presence when AOL Instant Messenger was the dominant chat client.
- jacalata 11y agoAs someone who is not personally humiliated by my interest in computers/tech/programming, I wasn't really entertained by the constant "oh yea lol it's cause I'm a waste of oxygen that I know that, don't you hate me as much as I hate myself?" Maybe I know too many nerds with actual self esteem issues to find it funny.
- baby 11y agoMaybe you should go out more?
- Gracana 11y agoI didn't take any of that too seriously, it's obvious they had a great time with the project and I thought the write-up was quite funny.
- _s 11y agoI don't think the OP feels humiliated - if anything, I think what many of us find entertaining is that he recognises the perceptions of nerds/geeks to some folks and is able to laugh about those perceptions / prejudices them while relating to himself; just a different of way of looking at his writing.
- benjamincburns 11y agoIt's not humorous because it's funny that he would have low self-esteem; it's humorous due to the irony in the juxtaposition of a demonstration of something so obviously clever and impressive and an over-the-top embodiment of a self-effacing stereotype. Maybe he's putting it on a bit thick, but I think it's well done.
- ceocoder 11y agoMy favorite part - > This friend recommended nvd3.js, presumably because you’re not making real graphs in 2016 unless your graphing library is <something>.js and requires at LEAST one other <something else>.js as a dependency. Everyone looks at you like “what, you DON’T already use <something else>.js? Jeez say goodbye to your Hacker News karma. Just apt-get install npm && npm install bower && bower install-” NO STOP IT THIS ISN’T WHAT TIM BERNERS-LEE WANTED”. edit: as huckyaus mentioned in a different thread, author did http://swagify.net/ http://swagify.net/ as well. In completely unrelated news, I'm changing my handle to [Tr1Ck$h0t][LEGIT][60x7]$$$C30C0DER$$$, that will make me really popular among the cool kids.
- joshmanders 11y agoThe whole article was fun. I loved it. Also to take it a step further, I wouldn't apt-get install npm, I'd first use ruby to install homebrew, then brew install nodejs, then npm install bower, then bower install. Because linux doesn't have enough package managers to manage my package managers to manage packages managed my package managers.
- stygiansonic 11y agoIndeed, the article was a great and humorous stream-of-consciousness. For me, it was this: > ... and I wouldn’t be embedding this ugly graph as a pdf into a LaTeX document that takes 3 passes of pdflatex to render...
- yread 11y agoYeah the irony is that the link to wiki on Tim Berners-Lee is actually http://t.umblr.com/redirect?z=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FTim_Berners-Lee&t=NGMzYTQyZWZjZDFkZGEzMTQ0MDMwM2QwNzk1MTA0OTNlZWNhYTY0NCxZRkpQNkM5SQ%3D%3D http://t.umblr.com/redirect?z=https%3A%2F%2Fen.wikipedia.org... Is this WHAT TIM BERNERS-LEE WANTED??!!!One1!?
- Themistocles 11y agocool
- NKCSS 11y ago
- BinaryIdiot 11y ago> If you reload the page you’ll see approximately fifty-bajillion network requests go off as Facebook desperately tries to load all the junk that it needs to display facebook.com. I like this part. As a developer I've often looked at the network usage of large websites / web applications and it's always surprising to me just how...unoptimized it is as far as network connections go. I mean Facebook loads decently enough and all I'm just surprised the first load isn't condensed into a small, handful of network calls to save on latency.
- simonw 11y ago"I mean Facebook loads decently enough and all I'm just surprised the first load isn't condensed into a small, handful of network calls to save on latency." Actually it is: https://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919/ https://www.facebook.com/notes/facebook-engineering/bigpipe-...
- BinaryIdiot 11y ago> Actually it is: https://www.facebook.com/notes/facebook-engineering/bigpipe-.. https://www.facebook.com/notes/facebook-engineering/bigpipe-.... Nope. Did you read through how BigPipe works? It's more than a handful; they basically load a whole bunch of mini web pages inside of another. I'm actually impressed they get better performance doing that; I would have thought condensing everything down would net much better performance. It would at least improve latency but I digress.
- Kluny 11y agoYet somehow it's ridiculously fast... like, when I'm waiting for some other site to load, I almost automatically open facebook or hn in another tab, because I know those two sites will load instantly while pretty much everything else on the internet will take a few seconds.
- RussianCow 11y agoReally? The notifications and the first story show up fairly quickly for me, but everything else usually takes a few seconds. Certainly not terrible, but I wouldn't call it "ridiculously fast" either.
- teen 11y agoYou're really funny! Great post. Highcharts.js is the easiest js library to make quick charts btw.
- bijection 11y agoAntimatter15 has a pretty cool clock style visualization of this from 2012 [1] [1] https://antimatter15.com/project/facebook-clock/ https://antimatter15.com/project/facebook-clock/
- drdiablo 11y agoNice work! I really like the idea that the web allows anyone to programmatically dig into the UI and extract data to do things. A friend and I actually made a whole API to interact with FB chat. You should check it out: https://github.com/Schmavery/facebook-chat-api https://github.com/Schmavery/facebook-chat-api. I'd really love to see what you can come up with, with some of the stuff we support.
- auscompgeek 11y agoI personally use BitlBee with bitlbee-facebook [1], and hook up my existing IRC bot to it. It works for my needs. [1]: https://github.com/jgeboski/bitlbee-facebook https://github.com/jgeboski/bitlbee-facebook
- dclowd9901 11y ago> when it’s midnight and your x-axis formatting function doesn’t convert UNIX times into JavaScript date objects properly because there’s no timezone information and I dunno JavaScript was written by some guy in two weeks (yeah I ain’t afraid to call it out what of it) and your binary-search based conversion of sparse timeseries data into uniformly dense timeseries data is causing so many data points to be graphed that it’s slowly crashing Chrome and you’re watching helplessly as your RAM goes up and Chrome won’t close the tab and it just doesn’t seem right that 2016, the year of the Linux Desktop has brought us this situation I mean I thought if you had enough <something>.js libraries this stuff was meant to just scale right up so tha- So, did you forget everything you learned about memory management? Or do you think Javascript really doesn't have sound memory management principles? Hell, it's not like you need to retain references to rendered points. Just dequeue them. Browser graphing libraries render to canvas which is just pixels.
- christiangenco 11y agoThis style of writing is so entertaining; it's like a funnier stream of conscious of what goes on in my head when hacking things like this together. If OP is the author, please write more.
- pranaysharma 11y agoGreat work and nice style of writing...felt like nerd Deadpool ripping away FB :P
- swampthinker 11y agoThat's actually a great way of putting it.
- LargeCompanies 11y agoThis is random, but.... Nice with this data I might finally and truly finish my Social Alarm Clock idea and do so in which it truly improves the sound of your alarm clock; one that always makes you smile, laugh, etc. There's been tons of social alarm clocks(from Justin Bieber to Nestle to Sony to Wakie, etc) since releasing sleep.fm in 2007 (a century ago in Internet years) yet no one has executed on the idea properly.
- glossyscr 11y ago"Graphing how addicted your friends are to Facebook and Facebook Messenger"
- dyscrete 11y agoAwesome and hilarious article. Id just like to note `for (;;);` is not to prevent users from using bad JSON parsers like `eval` but prevent older browsers with little to no cross domain policy from loading it with a script tag and doing evil XSS by overriding Array or Object constructors or prototypes to pull that data
- nothrabannosir 11y agoGood point. Minor nitpick: I believe this is called CSRF, not XSS? But Im just repeating stackoverflow comments at this point.
- ascorbic 11y agoNo, CSRF (cross-site request forgery) is where a page tricks your browser into making requests to another domain in which you're already authenticated, in order to perform some kind of action. e.g. an img or script with a src "http://example.com/message.php?message=you+are+hax0red&submit=1" http://example.com/message.php?message=you+are+hax0red&s.... You can sometimes perform similar tricks with self-submitting hidden forms, or XHR. Quite easy to mitigate using nonces and referrer checking.
- nothrabannosir 11y agoBut.. that's exactly what while(1); and friends in json responses protect you against? someone overriding the Array constructor function and including your JSON resource from a <script src=…> ? So this is, in fact, CSRF?
- ascorbic 11y agoNo, CSRF isn't about pulling scripts etc from another site, it's tricking the browser into making malicious HTTP requests. So, it's not trying to grab facebook .com/someinterestingdata.json, it's trying to trick your browser into performing actions on the target domain by making it perform GET or POST requests such as sending Facebook spam. It doesn't matter what the response is, it's just interested in the action. A while(1) won't do much if it's inside an img tag or hidden iframe rather than a script tag.
- pascalmahe 11y agoLoved the article. Great writing style! Especially loved all the links to Facebook :D
- mariust 11y agoThis is crazy, I had this idea like 1 month ago and I thought I will find some free time to make this happen by the end of this month, I guess I should thank you :) Nice story by the way :)
- zuck9 11y agoI had the idea a month ago too. I even started working on this yesterday but got distracted. Thought I would do it today, but woke up to see this. This is even crazier.
- zimpenfish 11y agoYou can use the MQTT Facebook plugin for Bitlbee and get similar online/offline/active information right there in your IRC client without all the screen-scraping faff.
- vmateixeira 11y agoVery good post! And very well written, very humorous. Thank you for your teachings as well!
- david90 11y agoThis is creepy, but yet very good illustration of social engineering
- aaronbasssett 11y agoSocial engineering, in the context of information security, refers to psychological manipulation of people into performing actions or divulging confidential information. I don't see how this is social engineering at all.
- erikbc 11y agoBecause it's not.
- gchokov 11y agoImpressive. Kudos to the author. p.s. I am hiring ;)
- awjr 11y agoThis is very well written, intelligent, and very entertaining. It's almost like he channelled Deadpool. Kudos. Oh and did not know about the Copy as cURL feature on Chrome!
- mattlutze 11y agoI followed his GitHub link at the bottom of the post and see that he's Australian. My preconceived stereotypes of Australians suddenly explains quite a bit of his writing style and humor, and makes the post that much more enjoyable.
- atrudeau 11y agoCool hack and awesome, fun writing, but on a more serious note : how is knowing your friends' usage/sleep patterns useful in any way? Could it be used for some dark, machiavélique purpose? And how about for advertisers? "Get your sleeping pills here" type ads?
- lewapkon 11y agoAre you aware that there is actually no requirements.txt in your repo?
- deleted 11y ago[deleted]
- lewapkon 11y agoI see that it is fixed now ;)
- dmichulke 11y agoThank god HN doesn't have the same feature (ehh, I suppose at least). But how about linkedin and reddit? I also bet that Whatsapp has this feature since I often see "Last seen at ...".