0

I have made a Facebook app in Ruby (using Sinatra and Koala), deployed it on Heroku and sat up all the settings and it works that way, but now I have to debug some functionality and for that reason I need to run application from localhost (using foreman start). I have read somewhere that I should make development version of my app and specify site url to localhost:[port_num] and I have done so.

  • The problem is when user(me) reach localhost:5000 and application redirects it to Facebook to get permissions (when Facebook login dialog should appears). At that point this error occurs:

    App Not Set Up: The developers of this app have not set it up properly for Facebook Login.

I saw this issue but in my development version of app there is no status and review settings and I don't see how to make application alive.

enter image description here

  • How to set up my app for Facebook Login while it runs on localhost?

or

  • What is the proper way to run Facebook app from localhost to get full functionality?
Community
  • 1
  • 1
foki
  • 8,624
  • 6
  • 33
  • 32
  • Can you just try running it on the standard HTTP port 80? Maybe the custom port is creating some problems. – Andrea Gottardo Dec 25 '14 at 22:02
  • Probably won't work without a HTTPS connection, you can use a tunneling service like ngrok.com. – Benji Dec 26 '14 at 00:13
  • I just tried ngrok.com and now it produces different error: "Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains." – foki Dec 26 '14 at 00:31
  • 1
    you don´t need https for external websites, only for page and canvas apps – andyrandy Dec 26 '14 at 00:40
  • I forgot to mention - before I tried to open 33d3c44f.ngrok.com I have set App Domain and Site url of development version of app to 33d8d04f.ngrok.com. And the error is:"iven URL is not allowed by the Application configuration.: ..." – foki Dec 26 '14 at 09:29

1 Answers1

1

The problem laid in Advanced settings in security section - development app "inherits" settings from base app so in Settings->Advanced->Security->Valid OAuth redirect URIs was initially url of my base app not my localhost:5000 and it causes a problem. One of solutions is to leave this field empty (and leave app open to redirect attacks) or to fill this field with your Site URL.

  • It seems that development version of an application can't be "alive".
  • To allow Facebook Login for users of your development app you should register them as testers under Roles tab.
foki
  • 8,624
  • 6
  • 33
  • 32