How can I add localhost:3000 to Facebook App for development

后端 未结 8 1509
忘掉有多难
忘掉有多难 2020-12-08 10:24

I am working on a Rails 4 app. On my laptop, development is done at localhost:3000. The actual domain of the site is roomidex.com.

How can

相关标签:
8条回答
  • 2020-12-08 10:56

    Facebook now requires "Valid OAuth redirect URIs" to be https.

    To use https locally (localhost:3000), I used [ngrok][1] which allows you to use https by providing a tunnel. To do this:

    1. I went to their website and downloaded their program
    2. I extracted the file for the program
    3. In my console, I went into the directory where ngrok was extracted to and entered 'grok http 3000' on my Windows machine, others may use './grok http 3000'
    4. After entering that, ngrok provided a https address which I put into the Valid OAuth Redirect URIs field in Facebook
    5. Then I started my server and was able to access it using that https address instead of localhost:3000
    0 讨论(0)
  • 2020-12-08 10:57

    You can create a test app that's connected to your main app. On the Dashboard or Settings page for your main app. scroll down and you'll see "Test Apps" in the menu that runs down the left side of the page. The test app will inherit settings from the main app, but it will permanently be in development mode, and it will have its own ID.

    More info on test apps here: https://developers.facebook.com/docs/apps/test-apps/

    The protocol for setting up an app to work on localhost has changed. After you get your test app set up, this explains the steps for setting it up to work on localhost:

    https://stackoverflow.com/a/24253054/2803458

    0 讨论(0)
提交回复
热议问题