从本地主机使用Facebook登录 [英] Working with Facebook login from localhost

查看:87
本文介绍了从本地主机使用Facebook登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Facebook登录的React/Horizo​​n应用程序. 我想知道是否可以使用从本地主机登录Facebook的选项?

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

推荐答案

所有这些答案都很好.

All these answers are good.

但是我想添加有关如何创建测试应用程序的信息(按照Facebook的建议).

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

转到该页面以管理Facebook应用程序(您必须先登录管理员): https://developers.facebook.com/apps/

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

将鼠标悬停在包含您的实时Facebook应用程序的区块上,然后单击右上角显示的向下箭头按钮.然后从菜单中选择创建测试应用.

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.

在此处查看文档: https://developers.facebook.com/docs/apps/test-apps/

关于其余的设置:

  • 保持应用处于开发状态
  • 转到设置->基本(左侧菜单),然后
    • 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)

      这篇关于从本地主机使用Facebook登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆