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

后端 未结 8 1508
忘掉有多难
忘掉有多难 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:38

    June 2015

    Go to My Apps > Settings > Basic

    App Domains

    • localhost

    Site Web

    • URL : http://localhost:8888/
    • Mobile URL : http://localhost:8888/

    It didn't work with port 80 or without any port unfortunately.

    0 讨论(0)
  • 2020-12-08 10:40

    Just create two applications.

    One for testing and one for release. You cannot supply the app with separate URL configurations.

    0 讨论(0)
  • 2020-12-08 10:43

    Your error is saying

    localhost URL is not allowed in the application

    I know, FB does not give a s**t about explaining, what do to in those moments, however, as far as I am concerned, I have found workaround.

    Basically, you need to "whitelist" locahost url in your app

    Here is what you are going to do

    1. Go to the app edit/summary page
    2. In the fourth field App Domains, you should already have roomidex.com, so add another address localhost
    3. The urls mentioned above are only valid, if each one of them is put into tabs, where you set, how you app integrates with Facebook (website with facebook login, App on facebook, Mobile web, …)
    4. I do this: I put my working URL, in your case roomidex.com into Website with facebook login, and my test, localhost URL, either into App on facebook or Page tab
    0 讨论(0)
  • 2020-12-08 10:44

    Just edit your hosts file with your domain that pointing to localhost and it should work fine.

    0 讨论(0)
  • 2020-12-08 10:51

    On the Facebook App page, click "edit App" then click "Advanced" in the left-hand navigation. Then for "Valid OAuth redirect URIs" add http://localhost:3000... or whatever you want the accepted redirect to be.

    0 讨论(0)
  • 2020-12-08 10:56

    Adding localhost to the Valid OAuth redirect URIs in the test app did not work for me but adding 127.0.0.1 did.

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