No More Temptations

sudo nano /etc/hosts 0.0.0.0 http://facebook.com 0.0.0.0 http://www.facebook.com sudo dscacheutil -flushcache That chunk of code run sequentially (don’t cut/paste it all at once) in terminal on the Mac kills all access to Facebook. I did it because I was finding myself drawn back to wrestling with pigs. I’m not sure Bernard Shaw said it but I remember my dad saying something similar growing up. When people post stuff from Prager U . . . it’s hard to resist but I’m trying to be smarter about my time and energy. I’ve sworn never to engage in a serious conversation on facebook before . . . but was finding it hard to resist in this case. Thus the full iron door of an edited host file was instituted. You might try it and see how often you find yourself going to a page without really thinking.

20

Grabbing FaceBook Comments – More Primitive Programming

Functional is a kind way to describe this . . . but it’s hard to argue with computers doing tedious work that was previously done by hand. The goal here was to automate the collection of the comments on 300 or so posts from the CDC’s Facebook page so they could be analyzed. Ebola is in the mix which leads to some comments that may very well rival YouTube comments in terms of causing me sadness. We did end up with around 34,000 comments which would have been hand copied in the past. So some karma balance was achieved. wTake all this with a grain or two of salt. It works but may very well be illegal in some states or do things in a way that would make real programmers weep. Consider my programming skills to be like a man trying to swat flies with a broomstick- lots of furious action, panting, cursing, and every so often I will kill a fly and celebrate wildly.1 The Facebook This was my first experience trying to do anything with Facebook. The hardest part here for me was just getting the stupid access token needed to get at the JSON feeds. I eventually found the secretly named Facebook Login Example. Part of my issue was that I thought I could skip the […]

15

Facebook Comments for Research

This is a post about (at least temporary) failure. I should be able to do all this via the Facebook API/SDK but I’m doing something wrong. While I’m learning a decent amount in the land of programming, fundamentally I still suck. With that cathartic self-flagellation out of the way . . . I’m working with someone who wants to grab all the comments from a large number of CDC posts about health issues for some research. She is currently doing it by hand. Here are two improvements to that awful reality.1 Expand All Comments In FB land if there are many comments you only see the most recent. And if there are many, many comments you have to keep hitting “View Previous Comments” over and over. That’s super boring to do once. If you have to do it a lot it would really suck. Enter Alec’s bookmarklet. I tweaked it a tiny bit because I think FB changed the wording but it works like a charm. You’d copy the text below. Add a bookmark and then click edit. Replace the URL with this text and name it whatever you want. Grab All Comments Now to grab all these enlightening comments . . . Install the Scraper Chrome Extension. You can now right click a particular item and choose “scrape similar.” […]