Search code examples
ruby-on-railsrubyfacebook-graph-apikoala

Ruby on rails facebook canvas app No route matches [POST] "/"


I am trying to build a facebook app using koala in rails. I am booting my app on localhost using webrick @ port 3000. My canvas url is http://localhost:3000/ However I can use my app from my browser typing http://localhost:3000/ in the browser and everything works (I can auth user,get access token,pull data). However when I try to access my app from facebook via my computer (sandbox mode is disabled), typing http://apps.facebook.com/xxxxxxx, I get following error instead of my app's

    Prefix Verb URI Pattern                      Controller#Action
    root GET /                                   home#index
    home_index GET /home/index(.:format)         home#index
    home_callback GET /home/callback(.:format)   home#callback

Solution

  • You don't have any routes to match! Every request by facebook is coming as POST-verb

    in your case, the following will catch it

    ```` post "/" => "home#index"