SimpleFacebook: A stupid-simple wrapper for the Facebook API

April 02, 2010 - 0 Comments - ruby facebook

I recently encountered a need for a minimal wrapper for Facebook’s API, so I wrote SimpleFacebook. Clocking in at just 56 lines, it’s perfect for interfacing with Facebook via Ruby, and nothing more. This is not intended as a replacement for Facebooker or RFacebook. It doesn’t provide any explicit Rails integration, such as controller filters for gating users. It only does the dirty work of putting together a valid API request and returning the results, deserialized from JSON. Example usage:

What is it useful for? My use case was an asynchronous worker which needed to grab some data from Facebook to be stored in a database somewhere. A Rails process was not necessary to do this, so loading up Facebooker or RFacebook seemed like overkill.

Someone else might find it useful, so I’ve released it under the MIT license. Everything is up on GitHub, which you can download and install as a gem (using rake install). The code is fairly simple, and fleshed out with specs.

Read more…

Facebooker Queue: Facebook API queues with Beanstalkd

May 23, 2009 - 1 Comment - ruby rails tools facebooker queue facebooker facebook

I’ve been working on a Rails-based Facebook app using the excellent Facebooker library, and the need became apparent for a background queueing service for calls to Facebook’s REST API.

I had already decided to go with Beanstalkd as a messaging queue for its fast, in-memory modus operandi, because this particular app makes API calls at a frequency comparable to the birthrate in China. Well, maybe not, but the potential is certainly there. I am also already using Beanstalkd in this project for purposes unrelated to the Facebook API, so I am married to it at this point.

There is currently a plugin called FacebookerMQ which uses its own custom database-backed queue. Since I had already decided on Beanstalkd and needed an in-memory queue, FacebookerMQ wouldn’t work for me. Also, I figured I could take things a step or two further.

So, without further ado, I am announcing Facebooker Queue (very clever name, I know). Not only does Facebooker Queue provide easy, transparent, drop-in API queueing for Face…

Read more…

Wha...?

11611e595f8866809b075a8e718e7600

Chris Vincent is a 20-something drummer, producer, and engineer from the Bay Area. This is where he writes whatever the hell he wants whenever the hell he wants to write it. Check your expectations at the home page.

Obligatory tag cloud

me san francisco bicycling ruby tdd css tools iphone games rails facebooker queue facebooker facebook arduino activerecord sql css tools development process company culture spam akismet bluepill god

Recent posts

Feed me

Atom is cool.

Get in touch

Questions, comments, ideas?
Let's talk.

Unabashed self-promotion

Recommend Me