Hi guys, I''m just getting started with facebooker. I got a nasty problem. Every request redirects to facebook for authentication because i have included ensure_authenticated_to_facebook and oce the authentication is over I''m redirected back to the callback URL. The original requested URL is lost. I suspected of not using DB sessions, but I''m using DB as the session store. Please help me out. How do I avoid redirects -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080225/2adba52f/attachment.html
Hey Ahmad, There is an example of this on the facebooker_tutorial , starts at step 4. http://apps.facebook.com/facebooker_tutorial/getting_started/user_adds_application Basically you can store the last_requested_url in a cookie, and then have facebook call an action that does the redirect for you. This is called the POST_ADD_URL on the application settings. Let me know if it makes sense, if not I will bust it out into its own lesson on the tutorial. Dave On Mon, Feb 25, 2008 at 4:59 AM, Ahmad AbdulLateef <ahmad at 360in.com> wrote:> > Hi guys, > > I''m just getting started with facebooker. I got a nasty problem. Every > request redirects to facebook for authentication because i have included > > ensure_authenticated_to_facebook and oce the authentication is over I''m > redirected back to the callback URL. The original requested URL is lost. I > suspected of not using DB sessions, but I''m using DB as the session store. > > > > Please help me out. How do I avoid redirects > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > >
Hi Dave, I''m not quite able to get it! I would be really great if you could show a sample app and I encouter a new problem. On my local machine everything works great but when i took it to my server at dreamhost, my app breaks with an error like Filter Chain Halted at ensure_authenticated_to_facebook. Now I get this dumb error like Facebooker::Session::IncorrectSignature when i included ensure_application_is_installed_by_facebook_user Any idea on this one? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080226/3b0e4db2/attachment.html
You could add the following to you application controller. def application_is_not_installed_by_facebook_user redirect_to session[:facebook_session].install_url(:next => request.request_uri) end This tells facebooker you want to redirect to the install url and set the next param to the original request when the application is not installed. After the user completes the install page facebook will redirect to the next param. Michael Niessner On Feb 25, 2008, at 5:59 AM, Ahmad AbdulLateef wrote:> Hi guys, > > I''m just getting started with facebooker. I got a nasty problem. > Every request redirects to facebook for authentication because i > have included > ensure_authenticated_to_facebook and oce the authentication is over > I''m redirected back to the callback URL. The original requested URL > is lost. I suspected of not using DB sessions, but I''m using DB as > the session store. > > > Please help me out. How do I avoid redirects > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080226/92100ef7/attachment.html
Well tats not my problem. Its like when I include ensure_application_is_installed_by_facebook_user at times I get this error Facebooker::Session::IncorrectSignature and other times I get redirected to the Install page which says You''ve already added AhmadTestApp to your Facebook applications. Visit the My Applications <http://www.facebook.com/editapps.php> page to adjust your settings or remove this app. I have unfrtunately a bad time with facebooer :-( . Can anyone please zip a basic working hello world facebooker app which includes ensure_application_is_installed_by_facebook_user. So tat I can look at where I messed up or find out if its gotta do with my system perse. Any help would be largely appreciated. On Tue, Feb 26, 2008 at 9:20 PM, Michael Niessner < mniessner at elevatedrails.com> wrote:> You could add the following to you application controller. > def application_is_not_installed_by_facebook_user > redirect_to session[:facebook_session].install_url(:next => > request.request_uri) > end > > This tells facebooker you want to redirect to the install url and set the > next param to the original request when the application is not installed. > After the user completes the install page facebook will redirect to the next > param. > > Michael Niessner > > On Feb 25, 2008, at 5:59 AM, Ahmad AbdulLateef wrote: > > Hi guys, > > I''m just getting started with facebooker. I got a nasty problem. Every > request redirects to facebook for authentication because i have included > > ensure_authenticated_to_facebook and oce the authentication is over I''m > redirected back to the callback URL. The original requested URL is lost. I > suspected of not using DB sessions, but I''m using DB as the session store. > > > Please help me out. How do I avoid redirects > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > >-- Regards Ahmad Software Architect Equvia Webservices | +919840126833 | MSN: ahmadifx at hotmail.com | Skype:ahmadifx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080227/e9fda4cf/attachment.html
Hi Ahmad, Im guessing you have something wrong with your configuration either on facebook or in your facebooker.yml file. make sure your facebook configs of Canvas Page URL("AhmadTestApp") match the canvas_page_name in facebooker.yml (in correct section) make sure your setup to fbml & website How are you accessing your application (what url?) - for facebooker setup with canvas & fbml you need to be going via http://apps.facebook.com/yourapp which version of facebooker do you have? which version rails do you have? I put directions to get a basic working version of facebooker going here: (they are 1.2.x rails directions, but they should work in 2.x) http://jnylund.typepad.com/joels_blog/2008/01/facebooker-gett.html Also Davids tutorial should help as well. Joel On Feb 27, 2008, at 4:16 AM, Ahmad AbdulLateef wrote:> Well tats not my problem. Its like when I include > ensure_application_is_installed_by_facebook_user at times I get this > error Facebooker::Session::IncorrectSignature and other times I get > redirected to the Install page which says > > You''ve already added AhmadTestApp to your Facebook applications. > Visit the My Applications page to adjust your settings or remove > this app. > I have unfrtunately a bad time with facebooer :-( . Can anyone > please zip a basic working hello world facebooker app which includes > ensure_application_is_installed_by_facebook_user. So tat I can look > at where I messed up or find out if its gotta do with my system perse. > > Any help would be largely appreciated. > > On Tue, Feb 26, 2008 at 9:20 PM, Michael Niessner <mniessner at elevatedrails.com > > wrote: > You could add the following to you application controller. > > def application_is_not_installed_by_facebook_user > redirect_to session[:facebook_session].install_url(:next => > request.request_uri) > end > > This tells facebooker you want to redirect to the install url and > set the next param to the original request when the application is > not installed. After the user completes the install page facebook > will redirect to the next param. > > Michael Niessner > > On Feb 25, 2008, at 5:59 AM, Ahmad AbdulLateef wrote: > >> Hi guys, >> >> I''m just getting started with facebooker. I got a nasty problem. >> Every request redirects to facebook for authentication because i >> have included >> ensure_authenticated_to_facebook and oce the authentication is over >> I''m redirected back to the callback URL. The original requested URL >> is lost. I suspected of not using DB sessions, but I''m using DB as >> the session store. >> >> >> Please help me out. How do I avoid redirects >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > -- > Regards > Ahmad > Software Architect > Equvia Webservices | +919840126833 | MSN: ahmadifx at hotmail.com | > Skype:ahmadifx _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080227/ff1d2ae4/attachment.html
Im using IFrame and not FBML. Does tat make a difference? On Wed, Feb 27, 2008 at 8:15 PM, Joel Nylund <jnylund at yahoo.com> wrote:> Hi Ahmad, > Im guessing you have something wrong with your configuration either on > facebook or in your facebooker.yml file. > > make sure your facebook configs of Canvas Page URL("AhmadTestApp") match > the canvas_page_name in facebooker.yml (in correct section) > make sure your setup to fbml & website > > How are you accessing your application (what url?) - for facebooker setup > with canvas & fbml you need to be going via > http://apps.facebook.com/yourapp > > which version of facebooker do you have? which version rails do you have? > > I put directions to get a basic working version of facebooker going here: > (they are 1.2.x rails directions, but they should work in 2.x) > > http://jnylund.typepad.com/joels_blog/2008/01/facebooker-gett.html > > Also Davids tutorial should help as well. > > Joel > > > On Feb 27, 2008, at 4:16 AM, Ahmad AbdulLateef wrote: > > Well tats not my problem. Its like when I include > ensure_application_is_installed_by_facebook_user at times I get this error > Facebooker::Session::IncorrectSignature and other times I get redirected to > the Install page which says > > You''ve already added AhmadTestApp to your Facebook applications. > Visit the My Applications <http://www.facebook.com/editapps.php> page to > adjust your settings or remove this app. > I have unfrtunately a bad time with facebooer :-( . Can anyone please zip > a basic working hello world facebooker app which includes > ensure_application_is_installed_by_facebook_user. So tat I can look at where > I messed up or find out if its gotta do with my system perse. > > Any help would be largely appreciated. > > On Tue, Feb 26, 2008 at 9:20 PM, Michael Niessner < > mniessner at elevatedrails.com> wrote: > > > You could add the following to you application controller. > > def application_is_not_installed_by_facebook_user > > redirect_to session[:facebook_session].install_url(:next => > > request.request_uri) > > end > > > > This tells facebooker you want to redirect to the install url and set > > the next param to the original request when the application is not > > installed. After the user completes the install page facebook will redirect > > to the next param. > > > > Michael Niessner > > > > On Feb 25, 2008, at 5:59 AM, Ahmad AbdulLateef wrote: > > > > Hi guys, > > > > I''m just getting started with facebooker. I got a nasty problem. Every > > request redirects to facebook for authentication because i have included > > > > ensure_authenticated_to_facebook and oce the authentication is over I''m > > redirected back to the callback URL. The original requested URL is lost. I > > suspected of not using DB sessions, but I''m using DB as the session store. > > > > > > Please help me out. How do I avoid redirects > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > -- > Regards > Ahmad > Software Architect > Equvia Webservices | +919840126833 | MSN: ahmadifx at hotmail.com | > Skype:ahmadifx _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > >-- Regards Ahmad Software Architect Equvia Webservices | +919840126833 | MSN: ahmadifx at hotmail.com | Skype:ahmadifx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080228/758adbbb/attachment.html
I think so, can one of the core developers let us know what the state of iframe support for facebooker is? I haven''t used iframe before, but my understanding of the way it works, is on the first call to the iframe you will get the fb_sig stuff, including "fb_sig_in_iframe"=>"1", but once you are in your iframe and clicking around, its your app directly, so there will be no fb_sig parms passed like in a canvas application. So adding the "ensure" filters to every call would definitely hose you up, because once you click anylink inside your iframe, you dont have the params to make these fitlers happy. So my suggestion unless there is some built in support is have a defined entry point to your application, and add the ensure filters just for that entry controller/method, put something in your session that knows they have fb installed & authenticated (presumably using your built in auth), then use your regular auth stuff for filtering all other requests. Make sense? My understanding of iframe is its great if you have a large complex existing application you dont want to rewrite, you can just plug it in, but the integration with facebook features is harder (api calls are just as easy, but the other stuff is harder). If you have a new application, fbml/canvas is more tightly integrated, and you get look & feel of facebook app, but learning curve is there to learn fmbl, but the facebooker guys make this easier by providing rails helpers to do lots of this stuff for you. I have a large complex existing application but have decided to go the fbml/canvas route anyway since it gives a better integration experience for the end user, besides if you have a fairly descent rails app its really jut building a new view for it. Joel On Feb 27, 2008, at 11:59 PM, Ahmad AbdulLateef wrote:> Im using IFrame and not FBML. Does tat make a difference? > > On Wed, Feb 27, 2008 at 8:15 PM, Joel Nylund <jnylund at yahoo.com> > wrote: > Hi Ahmad, > > Im guessing you have something wrong with your configuration either > on facebook or in your facebooker.yml file. > > make sure your facebook configs of Canvas Page URL("AhmadTestApp") > match the canvas_page_name in facebooker.yml (in correct section) > make sure your setup to fbml & website > > How are you accessing your application (what url?) - for facebooker > setup with canvas & fbml you need to be going via http://apps.facebook.com/yourapp > > which version of facebooker do you have? which version rails do you > have? > > I put directions to get a basic working version of facebooker going > here: (they are 1.2.x rails directions, but they should work in 2.x) > > http://jnylund.typepad.com/joels_blog/2008/01/facebooker-gett.html > > Also Davids tutorial should help as well. > > Joel > > > On Feb 27, 2008, at 4:16 AM, Ahmad AbdulLateef wrote: > >> Well tats not my problem. Its like when I include >> ensure_application_is_installed_by_facebook_user at times I get >> this error Facebooker::Session::IncorrectSignature and other times >> I get redirected to the Install page which says >> >> You''ve already added AhmadTestApp to your Facebook applications. >> Visit the My Applications page to adjust your settings or remove >> this app. >> I have unfrtunately a bad time with facebooer :-( . Can anyone >> please zip a basic working hello world facebooker app which >> includes ensure_application_is_installed_by_facebook_user. So tat I >> can look at where I messed up or find out if its gotta do with my >> system perse. >> >> Any help would be largely appreciated. >> >> On Tue, Feb 26, 2008 at 9:20 PM, Michael Niessner <mniessner at elevatedrails.com >> > wrote: >> You could add the following to you application controller. >> >> def application_is_not_installed_by_facebook_user >> redirect_to session[:facebook_session].install_url(:next => >> request.request_uri) >> end >> >> This tells facebooker you want to redirect to the install url and >> set the next param to the original request when the application is >> not installed. After the user completes the install page facebook >> will redirect to the next param. >> >> Michael Niessner >> >> On Feb 25, 2008, at 5:59 AM, Ahmad AbdulLateef wrote: >> >>> Hi guys, >>> >>> I''m just getting started with facebooker. I got a nasty problem. >>> Every request redirects to facebook for authentication because i >>> have included >>> ensure_authenticated_to_facebook and oce the authentication is >>> over I''m redirected back to the callback URL. The original >>> requested URL is lost. I suspected of not using DB sessions, but >>> I''m using DB as the session store. >>> >>> >>> Please help me out. How do I avoid redirects >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> >> >> >> -- >> Regards >> Ahmad >> Software Architect >> Equvia Webservices | +919840126833 | MSN: ahmadifx at hotmail.com | >> Skype:ahmadifx _______________________________________________ >> >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > -- > Regards > Ahmad > Software Architect > Equvia Webservices | +919840126833 | MSN: ahmadifx at hotmail.com | > Skype:ahmadifx-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080228/927c90f9/attachment-0001.html