::::: : the wood : davidrobins.net

In which I start using Facebook

News, Technical ·Monday February 23, 2009 @ 23:55 EST (link)

I was reluctant to start using "social networking" sites since they seemed faddish and content-free; the original reason I got a Facebook account (October 22, 2008) was because the University of Washington's Students for Concealed Carry on Campus (SCCC) group only had a Facebook page. So I added myself, poked around a very little, but didn't do much until recently. I found out yesterday from the conservatives and libertarians group at work (CLAMS) that the Redmond "Tea Party" event (which unfortunately didn't materialize) was organized there. That's when I started seriously looking for—and finding—people: lots of people, all the way from relatives and classmates in England, to more classmates (and friends from the assemblies, in Niagara, Ottawa, Waterloo, and Toronto) in Canada, to colleagues at work (and from previous places I worked: Toronto, Niagara Falls, Memphis, and Waltham).

(If you want to find me, since my name is rather common: I'm in the Seattle, WA and Microsoft networks, with Waterloo and University of Washington as my schools.)

Facebook Notes' blog import is handy (I updated my RSS feed generator to include the full content and fixed a time zone bug, then set the importer on it; it lets you preview first, so I made some tweaks and let it import). By design, my RSS feed only includes the last 10 entries; older material will always be on davidrobins.net.

One thing I really liked about Facebook is that it has an API, i.e. it can be programmed. (The other thing I like is that it doesn't let people create "home pages"; to see why, I give you MySpace as exhibit A, with oldies like GeoCities and a "great cloud of witnesses" trailing behind in garishly blinking splendor.) Naturally, I'm using the perl WWW::Facebook::API interface. It has a way to automatically upload and caption photos, which I'll be using when I get my huge backlog of photos organized (I'm writing a long-delayed local Javascript application for that, the Vortex Photo System, right now). I'll mass upload some photos over a period of time, in the hopes that people will tag them.

Fbcmd, a command-line interface to Facebook, seems cool (except: PHP, ew); had to fix a Unix bug (path separator, sent it to the author, who said thanks).

I was up until 3am finishing my Facebook photo upload test (random test photo, which my cousin immediately recognized).

Getting the application to talk to Facebook was a bit of a trick; the documentation is unclear. I learned some of it by looking at the Fbcmd application, too, since it's also a desktop application. It's necessary to go to the Facebook developer site (allow the Developer application access), add your application and get a key for it, then get a token by going to https://login.facebook.com/code_gen.php?api_key=your API key here&v=1.0. Pass that token to the WWW::Facebook::API $client->auth->get_token() method, which will populate $client->secret and $client->session_key, which can be saved and passed to the new method on subsequent invocations (initially, pass the application secret for secret; always pass the API key). I hope this information helps; the best Facebook desktop application information I could find was here on use.perl.org, and it was missing a lot. There's also an old Facebook login thread on Perlmonks (Perlmonks also has a Facebook group) and a status update script that's interesting since it uses LWP and not the Facebook API.

DVDs finished: M*A*S*H: Season Five, Stargate: Continuum, Dead Poets Society.