[Facebooker-talk] FB Canvas Controller

William Thomas wthomas989 at yahoo.com
Tue Sep 16 16:53:11 EDT 2008


I'm having a terrible time figuring this out. I think I am missing something key to the entire workings of Facebooker. I've created a sample application to test things out and am failing miserably.

When I try to access a controller that requires the app installed I am sent to facebook allowed to authorize the app and then get the message below. What I believe should happen is the facebook_aware/index.fbml.erb file should be displayed.

"
Error while loading page from facebookSandbox

The URL http://localhost:3000/facebook_aware/?auth_token=[this is really the auth token]&installed=1 is not valid.

There are still a few kinks Facebook and the makers of facebookSandbox are trying to iron out. We appreciate your patience as we try to fix these issues. Your problem has been logged - if it persists, please come back in a few days. Thanks!
"

here are what I believe are the relavent pieces of my app

routes.rb:
map.connect 'facebook_aware',:controller => "facebook_aware", :conditions => {:canvas => true}

development:
  canvas_page_name: facebook_aware
  callback_url: http://localhost:3000/facebook_aware/

facebook_aware_controller.rb:
class FacebookAwareController < ApplicationController
  
  before_filter :ensure_application_is_installed_by_facebook_user
  before_filter :ensure_authenticated_to_facebook 
  before_filter :ensure_has_status_update, :only => [:add_status_update]
  
  def add_status_update
    redirect_to :action => 'done'
  end
   
end

(map.root) index.html.erb:
This is where I ask the user to "add" the facebook component
<%= link_to "Use Facebook" , {:controller => "facebook_aware",:action => "index" } %>



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20080916/c12703e6/attachment.html>


More information about the Facebooker-talk mailing list