Facebook登录抛出"给定的URL不是由应用程序配置:一个或多个特定的URL允许不允许 [英] Facebook login throws "Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed

查看:1991
本文介绍了Facebook登录抛出"给定的URL不是由应用程序配置:一个或多个特定的URL允许不允许的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经被问了很多次,但还是这似乎抛出此错误altough我试了URL地址。

I know this question was already asked many times, but still It seems to throw this error altough I tried several url addresses.

我试图让Facebook登录通过一个asp.net MVC应用程序像微软教程
这里

I'm trying to make facebook login through a asp.net mvc app like in microsoft tutorial here.

当我检查一下本地主机上正常工作(在facebook网站URL设置为:的http://本地主机:55797 /
但是当我尝试检查我上传应用程序到服务器后,它给了我这个错误:

When I check it on local host it works fine (Site URL in facebook is set to: http://localhost:55797/ but when I try to check it after I upload the app to the server it gives me this error:

Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.

我的服务器登录页面是: <一个href=\"http://proj.ruppin.ac.il/igroup20/test1/Account/Login.aspx\">http://proj.ruppin.ac.il/igroup20/test1/Account/Login.aspx

我试着写在我的Facebook应用程序设置网站网址如下:

I tried to write the following in my facebook app settings Site URL:

*http://proj.ruppin.ac.il/
*http://proj.ruppin.ac.il/igroup20/
*http://proj.ruppin.ac.il/igroup20/test1/
*http://proj.ruppin.ac.il/igroup20/test1/Account/
*http://proj.ruppin.ac.il/igroup20/test1/Account/Login.aspx

但没有人对我的作品。

but none of them works for me.

这是我的AuthConfig.cs:

this is my AuthConfig.cs:

public static void RegisterOpenAuth()
        {
            // See http://go.microsoft.com/fwlink/?LinkId=252803 for details on setting up this ASP.NET
            // application to support logging in via external services.

            //OpenAuth.AuthenticationClients.AddTwitter(
            //    consumerKey: "your Twitter consumer key",
            //    consumerSecret: "your Twitter consumer secret");

            OpenAuth.AuthenticationClients.AddFacebook(
                appId: "474928559284763",
                appSecret: "****"); //hidden just for this question


            //OpenAuth.AuthenticationClients.AddMicrosoft(
            //    clientId: "your Microsoft account client id",
            //    clientSecret: "your Microsoft account client secret");

            //OpenAuth.AuthenticationClients.AddGoogle();
        }

编辑:

这些都是似乎与我有关的屏幕,但我似乎有不同的图形用户界面,而不是像汤米如向下在这里这篇文章:

those are the screens that seems relevant to me, but I seem to have different gui, not like Tommy for example down here in this post:

EDIT2:

我只注意到有用于应用程序域的地方,写有proj.ruppin.ac.il,并在网站URL:的 http://proj.ruppin.ac.il/igroup20/test1/ 但还是同样的错误。

I just noticed there is a place for app domains and wrote there "proj.ruppin.ac.il" and in the web site url: "http://proj.ruppin.ac.il/igroup20/test1/" but still same error

推荐答案

有关搜索的好处,我创建一个网站的测试版时,有相同的。

For the benefit of searchers, I had the same when creating a test version of a site.

答案是进入Facebook网站>应用程序>我的应用>设置>高级标签,并在题为有效的OAuth重定向的URI的部分添加本地主机地址。

The answer was to go into the facebook site > Apps > My App > Settings > 'Advanced' tab and add the localhost address in the section titled 'Valid OAuth redirect URIs'.

注:相同的工作作风将需要一个xyz.azurewebsites.net域以及当您正在测试一个。com

Note: The same style of work will be required for an xyz.azurewebsites.net domain as well as a .com when you are testing.

这篇关于Facebook登录抛出&QUOT;给定的URL不是由应用程序配置:一个或多个特定的URL允许不允许的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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