1

Nothing fancy here, but I'm on it since one hour with no success.

I'm trying to load my RoR root page welcome#index inside a Facebook canvas app.

My welcome#index is empty (http://sitlux-contact.herokuapp.com) and work well when url is copy-pasted in search bar

On Facebook, I set an "App on facebook" app with theses settings: Canvas url: http://sitlux-contact.herokuapp.com/ (note that the last "/" is requested by Facebook) Canvas secure url: https://sitlux-contact.herokuapp.com/

This is my Facebook canvas page url:

https://apps.facebook.com/sitlux-contact

Heroku page is working perfectly when direct url is used in browser, but generate a "The page you were looking for doesn't exist." when I'm trying to load it inside the canvas app.

Any clue on this would be very helpful. Thank you in advance. KR

Mene
  • 344
  • 2
  • 14

1 Answers1

1

Debugging your facebook app page using Firebug net panel saw that facebook is requesting your app url with a POST request. I've received the same response using this curl command

curl --data "fake_param=fake_value" https://sitlux-contact.herokuapp.com/

I think you should handle POST response to clients.

chok68
  • 875
  • 9
  • 10
  • Thank you for the hint. Unfortunately, I do not know how to use this info – Mene Mar 03 '14 at 00:41
  • Basically, in your Heroku app you're responding to GET requests and you should also respond to POST requests. curl is a small free open-source executable to send requests to your web app, you can download that from here: http://curl.haxx.se/download.html See the docs for usage, but the basic command I had in answer does a POST as facebook app is doing right now. – chok68 Mar 03 '14 at 11:07
  • Thank you ! So I set my routes file with this line: `match "/", controller: :facebook, action: :index, via: [:post]` where the facebook#index action contains a redirect_to my page. It gives me a "The change you wanted was rejected." – Mene Mar 04 '14 at 01:17
  • Ok, now I see same response using your facebook app and the heroku url side so they're both connected. Please take a look at [this](http://stackoverflow.com/questions/11252713/facebook-login-with-omniauth-error-change-was-rejected) that may help to solve heroku's side of things. Good luck! – chok68 Mar 04 '14 at 09:28