<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">In facebook its <br>callback url : http://localhost:3000/facebook_aware/<br>canvas_page: http://apps.facebook.com/facebook_aware/<br><br>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.<br><br>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<br><br>--- On <b>Tue, 9/16/08, Mike Mangino <i><mmangino@elevatedrails.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Mike Mangino
<mmangino@elevatedrails.com><br>Subject: Re: [Facebooker-talk] FB Canvas Controller<br>To: wthomas989@yahoo.com<br>Cc: facebooker-talk@rubyforge.org<br>Date: Tuesday, September 16, 2008, 4:52 PM<br><br><pre>What is your canvaspath in Facebook? It can't use localhost because <br>Facebook needs to be able to talk to your webserver. You'll need to <br>open up access to your server. I created the Tunnlr service to make <br>this easy (http://tunnlr.com)<br><br>Check out http://www.pragprog.com/titles/mmfacer for my book on <br>Facebook development. I know there is one By from peepcode as well.<br><br>Mike<br><br>On Sep 16, 2008, at 4:53 PM, William Thomas wrote:<br><br>> I'm having a terrible time figuring this out. I think I am missing <br>> something key to the entire workings of Facebooker. I've created a <br>> sample application to test things out and am failing miserably.<br>><br>> When I try to access a controller that
requires the app installed I <br>> am sent to facebook allowed to authorize the app and then get the <br>> message below. What I believe should happen is the facebook_aware/ <br>> index.fbml.erb file should be displayed.<br>><br>> "<br>> Error while loading page from facebookSandbox<br>><br>> The URL http://localhost:3000/facebook_aware/?auth_token=[this is <br>> really the auth token]&installed=1 is not valid.<br>><br>> There are still a few kinks Facebook and the makers of <br>> facebookSandbox are trying to iron out. We appreciate your patience <br>> as we try to fix these issues. Your problem has been logged - if it <br>> persists, please come back in a few days. Thanks!<br>> "<br>><br>> here are what I believe are the relavent pieces of my app<br>><br>> routes.rb:<br>> map.connect 'facebook_aware',:controller => <br>> "facebook_aware", :conditions => {:canvas =>
true}<br>><br>> development:<br>> canvas_page_name: facebook_aware<br>> callback_url: http://localhost:3000/facebook_aware/<br>><br>> facebook_aware_controller.rb:<br>> class FacebookAwareController < ApplicationController<br>><br>> before_filter :ensure_application_is_installed_by_facebook_user<br>> before_filter :ensure_authenticated_to_facebook<br>> before_filter :ensure_has_status_update, :only => <br>> [:add_status_update]<br>><br>> def add_status_update<br>> redirect_to :action => 'done'<br>> end<br>><br>> end<br>><br>> (map.root) index.html.erb:<br>> This is where I ask the user to "add" the facebook component<br>> <%= link_to "Use Facebook" , {:controller => <br>> "facebook_aware",:action => "index" } %><br>><br><br>--<br>Mike Mangino<br>http://www.elevatedrails.com<br><br><br><br></pre></blockquote></td></tr></table><br>