github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

sco / fakebook

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 32
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Click here to lend your support to: fakebook and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Simple Facebook platform simulator, to aid in developing Facebook canvas apps offline. — Read more

  cancel

http://github.com/sco/fakebook/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

fixing gemspec 
sco (author)
Fri Jul 18 09:25:39 -0700 2008
commit  e7fc75b31a2a19b18dab756109ca07bcbde26730
tree    b2d4f075998d1da102018bfec9af82032e48ba0b
parent  bd2336e763134e5005b234f1c687aaf1ab370522
fakebook /
name age
history
message
file .gitignore Wed Mar 12 15:05:24 -0700 2008 first commit [sco]
file LICENSE Thu Mar 13 16:59:57 -0700 2008 cleaned up comments and TODO [sco]
file README.rdoc Thu Jul 17 16:16:58 -0700 2008 cleanup [sco]
file Rakefile Fri Jul 18 09:25:39 -0700 2008 fixing gemspec [sco]
file TODO Thu Jul 17 16:16:58 -0700 2008 cleanup [sco]
directory bin/ Wed Apr 09 10:08:25 -0700 2008 improving static file handling, and changing so... [sco]
file fakebook.gemspec Fri Jul 18 09:25:39 -0700 2008 fixing gemspec [sco]
directory lib/ Thu Jul 17 16:16:58 -0700 2008 cleanup [sco]
README.rdoc

Fakebook

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
  host:     0.0.0.0
  port:     5000

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

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

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 = Fakebook.new # etc...
  Rack::Handler::Mongrel.run app, :Port => 5000

Getting started

To install via RubyGems:

  $ sudo gem install sco-fakebook --source http://gems.github.com/

Run the executable to see the available options:

  $ fakebook --help

To install the development version from the repository:

  $ wget http://github.com/sco/fakebook/tarball/master
  $ tar -xvf sco-fakebook-master.tar.gz
  $ cd sco-fakebook-master
  $ sudo rake install_gem

Dependencies

Ruby Rack >= 0.3.0

Author

Scott Raymond <sco@scottraymond.net>

Thanks to PackRat, from which this code was extracted.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server