Working with Facebook login from localhost

前端 未结 9 2112
无人及你
无人及你 2020-12-09 08:29

I have a React/Horizon app with facebook login. I am wondering if there is any option to work with facebook login from localhost?

9条回答
  •  心在旅途
    2020-12-09 09:21

    All these answers are good.

    However I want to add information about how to create a Test app (as recommended by Facebook).

    Go to the page to manage Facebook apps (you, the admin must be logged in): https://developers.facebook.com/apps/

    Hover over the block containing your live Facebook app and click on the down arrow button that appears on the top right corner. Then select Create Test App from the menu.

    The test app will be created with a snapshot of your production app's settings. After this, you can independently edit the settings of your test app without affecting your production app.

    See the documentation here: https://developers.facebook.com/docs/apps/test-apps/

    Regarding the rest of the setup:

    • keep your app in Development mode
    • go to Settings -> Basic (left hand menu) and
      • enter "localhost" for the App Domain
      • change your Site URL to the localhost version (e.g. http://localhost:3000/users/auth/facebook)

提交回复
热议问题