Skip to content
Simple Facebook platform simulator, to aid in developing Facebook canvas apps offline.
JavaScript Ruby
Latest commit e7fc75b Jul 18, 2008 @sco fixing gemspec
Failed to load latest commit information.
bin improving static file handling, and changing some defaults Apr 9, 2008
lib cleanup Jul 17, 2008
.gitignore first commit Mar 12, 2008
LICENSE cleaned up comments and TODO Mar 13, 2008
README.rdoc cleanup Jul 17, 2008
Rakefile fixing gemspec Jul 18, 2008
TODO cleanup Jul 17, 2008
fakebook.gemspec fixing gemspec Jul 18, 2008



Fakebook simulates the Facebook platform, to aid in developing Facebook canvas apps offline. It takes a request and passes it to the app as a POST with the fb_sig_* params added, etc. The response is returned with FBML parsed (sort of) and some chrome added.

In other words: you can work on Facebook canvas apps when you're on a plane.

To use, run 'fakebook' from the command line to start up a Fakebook proxy. For example, if you have an app running on port 3000, and the callback path is “/”, and the canvas path is “myapp”, you would run:

$ fakebook --callback="http://localhost:3000/" --canvas="myapp"

See “fakebook –help” for more options. By default, Fakebook will look for a config file at ./config/fakebook.yml. The file should look like this:

callback: http://localhost:3000/
canvas:   myapp
secret:   secret
user:     1
session:  session_key
friends:  2, 3, 4
port:     5000

You can also use the library directly with the Fakebook class, which eases testing:

require 'fakebook'
app = :callback  => "http://localhost:3000/",
                   :canvas    => "myapp",
                   :secret    => "secret",
                   :fb_params => { :user => 1, :session_key => 'session_key', :friends => [2, 3, 4] }

Because Fakebook implements #call according to the Rack specification, you can create an HTTP server that proxies to your application using your choice of server library (Mongrel, WEBrick, Thin, etc.) For example:

require 'fakebook'
app = # etc... app, :Port => 5000

Getting started

To install via RubyGems:

$ sudo gem install sco-fakebook --source

Run the executable to see the available options:

$ fakebook --help

To install the development version from the repository:

$ wget
$ tar -xvf sco-fakebook-master.tar.gz
$ cd sco-fakebook-master
$ sudo rake install_gem


Ruby Rack >= 0.3.0


Scott Raymond <>

Thanks to PackRat, from which this code was extracted.

Something went wrong with that request. Please try again.