Browse files

asking the user what their canvas name is instead of forcing the user…

… to change the routes later (which they'll forget to do)

Signed-off-by: Jeremy McAnally <jeremymcanally@gmail.com>
  • Loading branch information...
1 parent a38d522 commit a552d815fd7ba0ea1d5f8ff948d408aaddb86651 Mark Daggett committed with jm Feb 7, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 facebook.rb
View
5 facebook.rb
@@ -1,5 +1,7 @@
# Facebook Skeleton App
# from Mark Daggett (http://www.locusfoc.us)
+canvas_name = ask("What is your Facebook application's canvas name?")
+
# Plugins
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git'
@@ -187,7 +189,6 @@ def index
# GET /show/1
# GET /show/1.fbml
def show
- @index = 0
respond_to do |format|
format.fbml {} # show.fbml
end
@@ -846,7 +847,7 @@ def mock_facebooker_session(opts = {})
# Post-Authorize URL
# http://apps.facebook.com/FACEBOOK_APP_NAME/authorized
route "map.authorized '/authorized', :controller => 'facebook', :action => 'authorized'"
-route "map.bp_authorized '/FACEBOOK_APP_NAME/authorized', :controller => 'facebook', :action => 'authorized'"
+route "map.bp_authorized '/#{canvas_name}/authorized', :controller => 'facebook', :action => 'authorized'"
# Post-Authorize Redirect URL
# http://apps.facebook.com/FACEBOOK_APP_NAME/authorize_redirect

0 comments on commit a552d81

Please sign in to comment.