public
Fork of deadprogrammer/frankie
Description: Easy creation of Facebook applications in Ruby using plugin for Sinatra web framework that integrates with Facebooker gem.
Homepage: http://www.deadprogrammersociety.com
Clone URL: git://github.com/auser/frankie.git
Search Repo:
name age message
folder README Tue Apr 08 17:36:35 -0700 2008 Update readme a little bit. [Ron Evans]
folder init.rb Tue Apr 08 16:32:13 -0700 2008 Code copied from my test project that actually ... [Ron Evans]
folder lib/ Tue Apr 08 16:32:13 -0700 2008 Code copied from my test project that actually ... [Ron Evans]
README
frankie is a plugin for the Sinatra web framework (http://http://sinatrarb.com/) that allows you to easily create a 
Facebook application by using the Facebooker gem.

Written by Ron Evans (http://www.deadprogrammersociety.com)

Based on merb_facebooker (http://github.com/vanpelt/merb_facebooker) by Chris Van Pelt, which was based on
the Rails classes in Facebooker (http://facebooker.rubyforge.org/) by Mike Mangino, Shane Vitarana, & Chad Fowler

Thanks, everyone!

Here is a very simple example application:
-------
require "rubygems"
require "sinatra"

load_facebook_config "./config/facebooker.yml", Sinatra::Options.environment

# Facebooker helpers
before_attend :ensure_authenticated_to_facebook
before_attend :ensure_application_is_installed_by_facebook_user

## the site
get '/' do
  body "<h1>Hello #{session[:facebook_session].user.name} and welcome to frankie!</h1>"
end
-------

How to use frankie
- install the sinatra and facebooker gems
sudo gem install sinatra
sudo gem install facebooker

- Create the application directories for your new app, and grab the frankie plugin
mkdir myapp
cd myapp
mkdir config
mkdir vendor
cd vendor
git clone git://github.com/deadprogrammer/frankie.git

- Put your facebooker.yml file into the /myapp/config directory, and set the values to your information. Here is a 
simple example of the file:
-------
development:
 api_key: apikeyhere 
 secret_key: secretkeyhere
 canvas_page_name: yourcanvashere    
 callback_url: http://localhost:4567
test:
 api_key: apikeyhere 
 secret_key: secretkeyhere
 canvas_page_name: yourcanvashere    
 callback_url: http://localhost:4567
production:
 api_key: apikeyhere 
 secret_key: secretkeyhere
 canvas_page_name: yourcanvashere    
 callback_url: http://yourrealserver.com
-------

- Make sure you have setup your facebook application on the facebook site. Google "setup new facebook application" if 
you are unsure how to do this. I recommend starting with an IFrame application.

- Create your application, based on the sample above, and then run it:
ruby sample.rb

- Test your app by going to http://apps.facebook.com/yourappname

Have fun!