[Facebooker-talk] mapping callback url to the correct controller
josh.m.sharpe at gmail.com
Tue Dec 2 13:07:58 EST 2008
Yea, our entire app is at root, but I can't point my facebook app to that, I
want to point it right at the facebook controller.
On Tue, Dec 2, 2008 at 12:52 PM, Stéphane Akkaoui <
stephane.akkaoui at imeuble.info> wrote:
> Le 2 déc. 08 à 18:43, Josh Sharpe a écrit :
> First off, our default route is:
>> map.connect ':locale/:controller/:action/:id'
>> So I created a facebook controller which can be accessed at /en/facebook/
>> and I set up the callbackURL to be http://www.domain.com/en/facebook.
> I think the mistake is here.
> Since your rails app run under http://www.domain.com/, why do you add
> en/facebook to your callback url ?
> If you do so, facebook will ad all routes to this and it will append what
> you says : http://www.domain.com/en/facebook/en/facebook/something
>> This works and pulls up my index page just fine. But when I create a
>> really simple link on that page:
>> <%= link_to "Something Else", :action => :something %>
>> It links to: /en/facebook/en/facebook/something and I obviously get a
>> Routing error.
>> So I tried to set up some routes.rb trickery:
>> map.connect "/en/facebook/:locale/:controller/:action/:id"
>> map.connect "/en/facebook/:locale/:controller/:action"
>> This makes links point to:
>> So there is some kind of circular action going on here.
>> Any suggestions on how I can get out of this?
>> Facebooker-talk mailing list
>> Facebooker-talk at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Facebooker-talk