TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Graphing when your Facebook friends are awake

1302 点作者 adamch超过 9 年前

51 条评论

ceocoder超过 9 年前
My favorite part -<p>&gt; This friend recommended nvd3.js, presumably because you’re not making real graphs in 2016 unless your graphing library is &lt;something&gt;.js and requires at LEAST one other &lt;something else&gt;.js as a dependency. Everyone looks at you like “what, you DON’T already use &lt;something else&gt;.js? Jeez say goodbye to your Hacker News karma. Just apt-get install npm &amp;&amp; npm install bower &amp;&amp; bower install-” NO STOP IT THIS ISN’T WHAT TIM BERNERS-LEE WANTED”.<p>edit: as huckyaus mentioned in a different thread, author did <a href="http:&#x2F;&#x2F;swagify.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;swagify.net&#x2F;</a> as well. In completely unrelated news, I&#x27;m changing my handle to [Tr1Ck$h0t][LEGIT][60x7]$$$C30C0DER$$$, that will make me really popular among the cool kids.
评论 #11132802 未加载
评论 #11132604 未加载
评论 #11134106 未加载
评论 #11137539 未加载
评论 #11132076 未加载
评论 #11132197 未加载
评论 #11131757 未加载
542458超过 9 年前
Some 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&#x27;ve just given up and written my own server-side generator.
评论 #11131138 未加载
评论 #11131337 未加载
评论 #11131175 未加载
评论 #11130947 未加载
评论 #11130798 未加载
评论 #11131295 未加载
评论 #11131073 未加载
评论 #11130959 未加载
评论 #11131399 未加载
评论 #11130964 未加载
BinaryIdiot超过 9 年前
&gt; 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.<p>I like this part. As a developer I&#x27;ve often looked at the network usage of large websites &#x2F; web applications and it&#x27;s always surprising to me just how...unoptimized it is as far as network connections go.<p>I mean Facebook loads decently enough and all I&#x27;m just surprised the first load isn&#x27;t condensed into a small, handful of network calls to save on latency.
评论 #11131576 未加载
评论 #11131553 未加载
评论 #11132394 未加载
评论 #11131547 未加载
评论 #11135922 未加载
评论 #11134224 未加载
评论 #11135506 未加载
spydum超过 9 年前
I 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.
评论 #11131245 未加载
jonesb6超过 9 年前
&quot;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. &quot;<p>Great article. And a further reminder why Facebook kinda sucks.
评论 #11131303 未加载
jacalata超过 9 年前
As someone who is not personally humiliated by my interest in computers&#x2F;tech&#x2F;programming, I wasn&#x27;t really entertained by the constant &quot;oh yea lol it&#x27;s cause I&#x27;m a waste of oxygen that I know that, don&#x27;t you hate me as much as I hate myself?&quot; Maybe I know too many nerds with actual self esteem issues to find it funny.
评论 #11132079 未加载
评论 #11131498 未加载
评论 #11132262 未加载
评论 #11131815 未加载
评论 #11131403 未加载
christiangenco超过 9 年前
This style of writing is so entertaining; it&#x27;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.
a_bonobo超过 9 年前
&gt;Similarly, I’m not sure why there are these weird spikes every three minutes (+- ~1minute) sometimes.<p>Could these just be keep-alive requests? For example, the mobile app checks whether it&#x27;s still connected?
评论 #11131042 未加载
WilliamSt超过 9 年前
You should try to add some sort of tracking of when people start to write a message to you. If that&#x27;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.
评论 #11133681 未加载
gengkev超过 9 年前
I don&#x27;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.<p>On a side note,<p>&gt; 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().<p>This is wrong, as I commented on the linked StackOverflow post, perhaps a bit too strongly. But it&#x27;s really frustrating to see that people have misconceptions because of incorrect answers on StackOverflow.
评论 #11131312 未加载
评论 #11131414 未加载
评论 #11131198 未加载
评论 #11131331 未加载
评论 #11131945 未加载
buremba超过 9 年前
It would be real creepy if someone does the same thing for Whatsapp, you can even predict who&#x27;s talking to each other much better than Facebook. It&#x27;s a bit harder to collect data from web.whatsapp.com because it&#x27;s using Websockets but let me know if someone develop such tool and publish it on Github. :)
评论 #11133205 未加载
评论 #11133450 未加载
评论 #11133041 未加载
评论 #11132809 未加载
评论 #11132326 未加载
theon144超过 9 年前
I know I&#x27;m in the minority here, but I just couldn&#x27;t bear the writing style. I&#x27;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.
awjr超过 9 年前
This is very well written, intelligent, and very entertaining. It&#x27;s almost like he channelled Deadpool. Kudos.<p>Oh and did not know about the Copy as cURL feature on Chrome!
anaphor超过 9 年前
I 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&#x27;s in Racket to visualize it. Also I made a thing to do desktop notifications whenever someone came online, which is actually kinda useful.
bijection超过 9 年前
Antimatter15 has a pretty cool clock style visualization of this from 2012 [1]<p>[1] <a href="https:&#x2F;&#x2F;antimatter15.com&#x2F;project&#x2F;facebook-clock&#x2F;" rel="nofollow">https:&#x2F;&#x2F;antimatter15.com&#x2F;project&#x2F;facebook-clock&#x2F;</a>
drdiablo超过 9 年前
Nice 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: <a href="https:&#x2F;&#x2F;github.com&#x2F;Schmavery&#x2F;facebook-chat-api" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Schmavery&#x2F;facebook-chat-api</a>. I&#x27;d really love to see what you can come up with, with some of the stuff we support.
评论 #11132069 未加载
glossyscr超过 9 年前
<i>&quot;Graphing how addicted your friends are to Facebook and Facebook Messenger&quot;</i>
dclowd9901超过 9 年前
&gt; 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 &lt;something&gt;.js libraries this stuff was meant to just scale right up so tha-<p>So, did you forget everything you learned about memory management? Or do you think Javascript really doesn&#x27;t have sound memory management principles? Hell, it&#x27;s not like you need to retain references to rendered points. Just dequeue them. Browser graphing libraries render to canvas which is just pixels.
pranaysharma超过 9 年前
Great work and nice style of writing...felt like nerd Deadpool ripping away FB :P
评论 #11132010 未加载
karlding超过 9 年前
You 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.<p><pre><code> SELECT uid, name, online_presence FROM user WHERE online_presence IN (&#x27;active&#x27;, &#x27;idle&#x27;) AND uid IN ( SELECT uid2 FROM friend WHERE uid1 = me() ) </code></pre> Unfortunately, the current version of the Facebook Graph API[0] doesn&#x27;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?<p>[0] <a href="https:&#x2F;&#x2F;developers.facebook.com&#x2F;docs&#x2F;graph-api&#x2F;reference&#x2F;v2.5&#x2F;user" rel="nofollow">https:&#x2F;&#x2F;developers.facebook.com&#x2F;docs&#x2F;graph-api&#x2F;reference&#x2F;v2....</a>
gohrt超过 9 年前
What 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&#x27;s friend live in the FB app all day long?
评论 #11130994 未加载
mattlutze超过 9 年前
I followed his GitHub link at the bottom of the post and see that he&#x27;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.
Wingman4l7超过 9 年前
Reminds me of the old-school user tracker <i>(whose name escapes me)</i> that would give you a bar graph of your friend&#x27;s online&#x2F;offline presence when AOL Instant Messenger was the dominant chat client.
Matiss超过 9 年前
This 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!
enig_matic7超过 9 年前
So, I can mine when my friends are online.<p>Perhaps, buy some targetted ads about &#x27;SleepCycle&#x27; and show them to the naughty ones who sleep less than 6 hours. :P
dyscrete超过 9 年前
Awesome 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
评论 #11132357 未加载
atrudeau超过 9 年前
Cool hack and awesome, fun writing, but on a more serious note : how is knowing your friends&#x27; usage&#x2F;sleep patterns useful in any way? Could it be used for some dark, machiavélique purpose?<p>And how about for advertisers? &quot;Get your sleeping pills here&quot; type ads?
soofy超过 9 年前
Another neat FB analysis:<p>Data Science of the Facebook World<p><a href="http:&#x2F;&#x2F;blog.stephenwolfram.com&#x2F;2013&#x2F;04&#x2F;data-science-of-the-facebook-world" rel="nofollow">http:&#x2F;&#x2F;blog.stephenwolfram.com&#x2F;2013&#x2F;04&#x2F;data-science-of-the-f...</a>
Buetol超过 9 年前
Small tip: If you don&#x27;t want to be tracked, you can also turn off the chat.
评论 #11131166 未加载
评论 #11131927 未加载
评论 #11131191 未加载
mariust超过 9 年前
This 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 :)
评论 #11132301 未加载
lewapkon超过 9 年前
Are you aware that there is actually no requirements.txt in your repo?
评论 #11139598 未加载
评论 #11139597 未加载
dmichulke超过 9 年前
Thank god HN doesn&#x27;t have the same <i>feature</i> (ehh, I suppose at least). But how about linkedin and reddit?<p>I also bet that Whatsapp has this feature since I often see &quot;Last seen at ...&quot;.
zimpenfish超过 9 年前
You can use the MQTT Facebook plugin for Bitlbee and get similar online&#x2F;offline&#x2F;active information right there in your IRC client without all the screen-scraping faff.
davidwparker超过 9 年前
Nice little investigating!<p>Personally, I have chat off all the time on FB, and I don&#x27;t have the Messenger (or FB) app on my phone either, so I guess I&#x27;m always sleeping :)
jordan801超过 9 年前
Love 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&#x27;m not sure why.
beatpanda超过 9 年前
seriously though how are you not already using D3
评论 #11131418 未加载
obelisk_超过 9 年前
inb4 facebook resolves this issue by banning anyone who&#x27;s connected 24&#x2F;7. (that wouldn&#x27;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.)
评论 #11131043 未加载
teen超过 9 年前
You&#x27;re really funny! Great post. Highcharts.js is the easiest js library to make quick charts btw.
aham超过 9 年前
This is brilliantly creepy, and so well written as to be both engaging and informative. Thanks!
merb超过 9 年前
Not sure if this blog post is great because of the thing he is doing or the way he writes it.
vmateixeira超过 9 年前
Very good post! And very well written, very humorous. Thank you for your teachings as well!
Globz超过 9 年前
Very good and fun to read article.<p>Thanks for all this amazing info!<p>peace - [2edgy4u][ev REE DAI][24x7BLAZEIT]|ggg10Bzzz|
pascalmahe超过 9 年前
Loved the article. Great writing style!<p>Especially loved all the links to Facebook :D
AznHisoka超过 9 年前
Does this work for anyone, even if you&#x27;re not their friend?
评论 #11130934 未加载
评论 #11130835 未加载
评论 #11130865 未加载
评论 #11130836 未加载
meapix超过 9 年前
I don&#x27;t have facebook but my friends are on facebook.
yojoma超过 9 年前
This was hilarious and really cool!
gchokov超过 9 年前
Impressive. Kudos to the author.<p>p.s. I am hiring ;)
brightball超过 9 年前
Great writing style. Hilarious.
xiphias超过 9 年前
So to make it useful it just needs to find the pairs of people who ,,go to sleep&#x27;&#x27; at the same time
LargeCompanies超过 9 年前
This is random, but....<p>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.<p>There&#x27;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.
david90超过 9 年前
This is creepy, but yet very good illustration of social engineering
评论 #11132521 未加载