[Facebooker-talk] FB Canvas Controller

William Thomas wthomas989 at yahoo.com
Tue Sep 16 18:03:24 EDT 2008


In facebook its 
callback url : http://localhost:3000/facebook_aware/
canvas_page: http://apps.facebook.com/facebook_aware/

I can try having the callback point to a domain on the internet easy to do, I already have no-ip running @ home... hopefully that will be my only problem.

Is it right that I use :conditions => {:canvas => true} for my facebook_aware controller? The goal is to have that controller only exist in a Facebook canvas so I can redirect a user to that controller, and then have facebook take over asking them permissions, etc so my website can do things like query friends and post updates

--- On Tue, 9/16/08, Mike Mangino <mmangino at elevatedrails.com> wrote:
From: Mike Mangino <mmangino at elevatedrails.com>
Subject: Re: [Facebooker-talk] FB Canvas Controller
To: wthomas989 at yahoo.com
Cc: facebooker-talk at rubyforge.org
Date: Tuesday, September 16, 2008, 4:52 PM

What is your canvaspath in Facebook? It can't use localhost because  
Facebook needs to be able to talk to your webserver. You'll need to  
open up access to your server. I created the Tunnlr service to make  
this easy (http://tunnlr.com)

Check out http://www.pragprog.com/titles/mmfacer for my book on  
Facebook development. I know there is one By from peepcode as well.

Mike

On Sep 16, 2008, at 4:53 PM, William Thomas wrote:

> 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" } %>
>

--
Mike Mangino
http://www.elevatedrails.com






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


More information about the Facebooker-talk mailing list