[Facebooker-talk] ensure_authenticated_to_facebook - redirect?

Richard Jordan jordanr at cs.washington.edu
Sat Aug 16 19:00:20 EDT 2008


Weird, I've never seen that before.  But, I think you're real close --
some strange bug somewhere.  Sorry, I really can't image where.

On Sat, 16 Aug 2008, Allen Walker wrote:

> When I try to access the app url and I'm not logged in, it redirects to "this 
> page doesn't exist" with the URL: http://www.facebook.com/myapp/activities/12
>
> So I then login and then it goes to www.facebook.com home page.
>
>
>
> Richard Jordan wrote:
>>  So now you redirect to a facebook error page that says something like
>>  "this page does not exist"?  You are no longer redirected back to your
>>  server?
>>
>>  Richard
>>
>>  On Sat, 16 Aug 2008, Allen Walker wrote:
>> 
>> >  It appears to be going to "www.facebook.com/myapp/relative_url"  instead 
>> >  of "apps.new.facebook.com/myapp/relative_url"
>> > 
>> >  Richard Jordan wrote:
>> > >   Gee, nothing ever works it seems.  Is the filter ever hitting?  Do 
>> > >   you
>> > >   ever get params[:auth_token] to be true?  Is the filter the problem 
>> > >  or the
>> > >   redirection?
>> > > 
>> > >  I have an app up and working and available on GitHub with that code in 
>> > >  it,
>> > > >   git clone git://github.com/jordanr/couple-rater.git
>> > > 
>> > >   Here are some of my facebook settings,
>> > > >   Callback URL
>> > > >      http://www.xxx.com/
>> > > >   Canvas URL
>> > > >      http://apps.facebook.com/couplerater/
>> > > >   Post-Add URL
>> > > >      http://apps.facebook.com/couplerater
>> > > >   Post-Remove URL
>> > > >      http://www.xxx.com/uninstall
>> > > 
>> > >  But really, I defer to Dave and Mike on anything.  I'd first try to do 
>> > >  it
>> > >   their way.
>> > > 
>> > >   Richard
>> > > 
>> > >   On Fri, 15 Aug 2008, Allen Walker wrote:
>> > > 
>> > > >   I did the following and it's still redirecting to my base web 
>> > >  page url (
>> > > >   www.xxx.com) and not my facebook app:
>> > > > >   in application.rb I have:
>> > > > >   before_filter :redirect_if_auth_key
>> > > > >   *def redirect_if_auth_key
>> > > >      if( params[:auth_token])
>> > > >        redirect_to( url_for(:controller =>"public", :action => 
>> > >  "index",
>> > > > :  canvas => true, :only_path => false))
>> > > >      end
>> > > >    end*
>> > > > > > >   On Fri, Aug 15, 2008 at 10:28 AM, Richard Jordan
>> > > >   <jordanr at cs.washington.edu>wrote:
>> > > > > >   I use a before_filter thrown on a facebook auth_token.  Here 
>> > >  is the > >  code.
>> > > > >  ======================================================
>> > > > >  #  when a user authenticates to facebook this before filter 
>> > >  redirects
>> > > > >  #  the user back to a fbml canvas page instead of to html on our 
>> > > > >   server.
>> > > > >    before_filter :redirect_if_auth_key
>> > > > > > >    # keeps the user inside facebook
>> > > > >    def redirect_if_auth_key
>> > > > >      if( params[:auth_token])
>> > > > >        redirect_to( url_for(:action => "whateveryouwant",
>> > > > > :  canvas => true, :only_path => false))
>> > > > >      end
>> > > > >   end
>> > > > >   ======================================================
>> > > > > > >   Try the filter in your app/controller/application.rb.
>> > > > > > >   Richard
>> > > > > > >   On Thu, 14 Aug 2008, Allen Walker wrote:
>> > > > > > >    If someone isn't logged in this filter works - it takes 
>> > >  them to the
>> > > > > >   facebook login page. However after logging in it's going to 
>> > >  my root
>> > > > > >   application URL outside of facebook. How do I set the proper 
>> > > > > >   redirect URL
>> > > > > >   after a user logs into facebook?
>> > > > > > > > >   thanks
>>>>>>> _______________________________________________
>> > > > > >   Facebooker-talk mailing list
>> > > > > >   Facebooker-talk at rubyforge.org
>> > > > > >   http://rubyforge.org/mailman/listinfo/facebooker-talk
>> > > > > > > > > > > > > > > 
>> > 
>> > 
>> > 
>> 
>
>


More information about the Facebooker-talk mailing list