Created
April 18, 2011 20:35
-
-
Save kylemac/926110 to your computer and use it in GitHub Desktop.
A quick helper method to accommodate FB iframe app's on Pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra/base' | |
module Sinatra | |
module FBHelper | |
def fb_tab(path, opts={}, &block) | |
post(path, opts, &block) | |
get(path, opts, &block) | |
end | |
end | |
end | |
class App < Sinatra::Base | |
register Sinatra::FBHelper | |
# fb_tab() extends the traditional get() or post() methods | |
# to accommodate Facebook's use of POST for loading iframe tabs | |
fb_tab '/' do | |
'Hello World' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment