【问题标题】:The domain of this URL isn't included in the app's domains. (subdomains!)此 URL 的域不包含在应用程序的域中。 (子域!)
【发布时间】:2018-09-06 00:49:38
【问题描述】:

我的问题是这样的:

Facebook App - The domain of this URL isn't included in the app's domains. Why?

除了我的网址是:http://ccc.nnn.hhh.hu

fb 上的设置,“facebook 登录”:

客户端 OAuth 登录:开启

Web OAuth 登录:开启

有效的 OAuth 重定向 URI:http://ccc.nnn.hhh.hu/my.php

严格模式已开启(无法禁用)

基本:

应用域:http://ccc.nnn.hhh.hu

所以,当尝试登录时,Facebook 对话框会询问用户名和密码,到目前为止一切正常。然后我得到一个例外:

$fb = new Facebook\Facebook([
    'app_id' => aeaeae,
    'app_secret' => rrrrr,
    'default_graph_version' => 'v2.5'
]);

$helper = $fb->getRedirectLoginHelper();
$accessToken = $helper->getAccessToken();

我不会得到 $accessToken 但执行:

此 URL 的域不包含在应用的域中。

【问题讨论】:

  • http://ccc.nnn.hhh.hu 做的第一件事是将我重定向到http://mywww.hu/ ...?
  • 它是一个虚构的虚构名称......
  • 那不是很聪明……那么祝你好运。 (在提供相关信息的这种程度的dipsh * tdity上,我出局了。)

标签: php facebook


【解决方案1】:

对,你必须将sdk升级到“5.6.2”才能支持strict mode

Facebook 现在默认强制使用严格模式,这意味着我们应该使用标准重定向 URL,或者在 Valid Oauth redirect URIs 列表中声明我们旧的自定义 URI。见:

https://developers.facebook.com/blog/post/2017/12/18/strict-uri-matching/

因此,除了升级 sdk 之外,你们还想在列表中添加自定义 URI 以支持旧版应用程序流。

【讨论】:

    【解决方案2】:

    好的,解决了。

    我使用的是“5.4.2”并升级到“5.6.2”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-01
      • 2018-03-30
      • 2018-03-27
      • 2020-07-04
      • 1970-01-01
      • 2018-08-30
      • 2021-11-13
      相关资源
      最近更新 更多