Facebook应用-该URL的域不包含在应用的域中.为什么? [英] Facebook App - The domain of this URL isn't included in the app's domains. Why?

查看:92
本文介绍了Facebook应用-该URL的域不包含在应用的域中.为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用Facebook应用程序登录时,出现以下错误:

When trying to login with a Facebook app, I'm getting the following error:

无法加载URL:此URL的域不包含在应用程序的域中.为了能够加载此URL,请将应用程序的所有域和子域添加到应用程序设置的应用程序域"字段中.

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.

如您在下图所见:

URL: http://www.facebook-php-test.com

以下是我在Facebook应用上设置的配置.

Below is the configuration I have set on my Facebook App.

(注意:出于隐私目的,我更改了图像上App IDApp Secret的值)

(Notice: for privacy purposes I changed the values for App ID and App Secret on the image)

此基本示例应用程序的代码位于以下GitHub存储库中:

The code for this basic sample application is on this GitHub repository:

https://github.com/zeuscronos/facebook-php-test.com

我真的不知道为什么它在真正出现时会说the domain of this URL isn't included in the app's domains.

I really don't know why it says that the domain of this URL isn't included in the app's domains when it is actually there.

在现场:App Domains我同时尝试了两个域:

On the field: App Domains I tried with both domains at the same time:

  • facebook-php-test.com
  • www.facebook-php-test.com

但没有成功.

生成的登录URL如下:

The generated login URL is as follows:

我将域facebook-php-test.com配置为Apache服务器上的虚拟主机.

I configured the domain: facebook-php-test.com as a virtual host on an Apache server.

我不得不说我在Facebook PHP SDK上做了很多工作,这是我第一次为此感到困惑.实际上,我在使用的另一个大型应用程序遇到了这个问题,然后在尝试解决几个小时后,我创建了这个虚拟应用程序以试图找出问题的原因.

I have to say that I have worked a lot with the Facebook PHP SDK and this is the first time I'm getting struggle with this. Actually, I got this problem with another big application I was working with then after couple of hours trying to solve the problem I created this dummy application to try to figure out what's the cause of the problem.

我尝试了很多事情都没有成功.

I have tried many things with no success.

关于如何解决此问题的任何想法?

Any idea on how to solve this?

谢谢.

编辑01

按照Mr.Geeker评论的建议,我做了以下工作...

Following the suggestion of Mr.Geeker comment I did the following...

添加了产品:Facebook Login,并且配置如下:

Added the product: Facebook Login and configured like below:

然后,最后我可以继续前进,并要求我提供权限:

Then, finally I could go forward, and I was asked for permissions:

但是不幸的是,在授予权限之后,我得到了以下信息:

But unfortunately, after granting permissions, I got the following:

关于如何从这一点继续进行的任何想法?

Any idea on how to continue from this point?

编辑02-解决方案

我结束了禁用选项:Client OAuth Settings下的Use Strict Mode for Redirect URIs.他们说strongly recommended具有此功能On,但是我无法在On上使用它.

I ended disabling the option: Use Strict Mode for Redirect URIs under Client OAuth Settings. They say it is strongly recommended has this feature On but I could not get this working with that On.

通过我也禁用的方式:Client OAuth Login,因为我的应用未使用它.

By the way I also disabled: Client OAuth Login since my app doesn't use it.

最后,我在Client OAuth Settings下启用的唯一功能是:Web OAuth Login.

Finally, the only feature I have enable under: Client OAuth Settings is: Web OAuth Login.

推荐答案

Facebook现在可以将某些功能用作插件.在左侧选择产品,然后添加产品.然后选择Facbook登录.从那里开始,您会看到所有Oauth选项都显示出来.
Facebook now roles some features as plugins. In the left hand side select Products and add product. Then select Facbook Login. Pretty straight forward from there, you'll see all the Oauth options show up.

如最初回答的那样 查看全文

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