Facebook OAuth "The domain of this URL isn' t 包含在应用程序的域中”

标签 facebook laravel facebook-graph-api oauth laravel-socialite

首先让我说我已经搜索了这个问题的答案很长一段时间...

我正在尝试设置 Facebook OAuth 以与在我的机器上本地开发的应用程序一起使用。一切都在 Facebook 授权下完美运行,直到我从使用 localhost 转移到另一个域名(仍然是我机器的本地域名)。现在我收到以下错误。

Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.

我的主机文件包含 127.0.0.1 domain.dev(完美运行)

我的应用程序(使用 Socialite)中的重定向是 http://domain.dev/auth/facebook/callback

在我的 Facebook 应用程序设置中...

  • 我的应用域是 domain.dev
  • 我的站点 URL 是 http://domain.dev/
  • 我的有效 OAuth 重定向 URI 是 http://domain.dev/auth/facebook/callback

出现错误消息时的 URL 是..

https://www.facebook.com/v2.5/dialog/oauth?client_id=XXXXXXXXXXXXXXX&redirect_uri=http%3A%2F%2Fdomain.dev%2Fauth%2Ffacebook%2Fcallback&scope=email&response_type=code&state=0ztcKhmWwFLtj72TWE8uOKTcf65JmePtG95MZLDD

我不知道问题是什么......

屏幕截图 1
Screen Shot

屏幕截图 2 enter image description here

最佳答案

以防有人遇到这个问题并正在寻找这些设置(就像我一样)

你必须

  1. 在左侧,点击“+ 添加产品”并选择“Facebook 登录”(位于 最适合我)
  2. 在左侧查看可用的新设置
  3. 您现在将在该“产品设置”上拥有这些 OAuth 设置

enter image description here

附加信息:确保将回调 URL 添加到http://localhost:3000Valid OAuth redirect URIs 字段Facebook登录的设置页面

关于Facebook OAuth "The domain of this URL isn' t 包含在应用程序的域中”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37063685/

相关文章:

php - 检查代码接收中是否有 404

Laravel 项目在共享托管中上传问题

php - Laravel 在 View 中列出路由

ios - Facebook 登录问题 iOS9 + Parse

ios - 无效的 iOS bundle

php - 如何停止登录按钮应用程序请求好友列表权限

facebook-graph-api - "unknown"遍历分页时出现 OAuthException

python - 使用 Python for Facebook 进行搜索

facebook-graph-api - Facebook Graph Api——我可以得到 "default"字段加上一些吗?

javascript - Facebook XFBML 未在 Internet Explorer 8 中呈现