我知道這個問題已經被問了很多次,但仍似乎altough我試了幾個拋出這個錯誤URL地址。Facebook登錄拋出「給定的URL不是由應用程序配置:一個或多個指定的URL允許不得
我試圖讓Facebook登錄通過asp.net MVC應用程序像微軟教程 here。
當我檢查一下本地主機上正常工作(網站URL在Facebook的設置於:http://localhost:55797/
但是當我嘗試檢查它,我上傳應用程序到服務器後,它給了我這個錯誤:
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.
我的服務器的登錄頁面是:http://proj.ruppin.ac.il/igroup20/test1/Account/Login.aspx
我試着寫在我的Facebook應用程序設置網站的網址如下:
*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
但沒有人對我的作品。
這是我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();
}
編輯:
那些似乎與我有關的屏幕,但我似乎有不同的圖形用戶界面,而不是像湯米例如降這裏在這個崗位:
EDIT2:
我只注意到有對應用程序域的地方,寫有「proj.ruppin.ac.il」,並在網站URL:「http://proj.ruppin.ac.il/igroup20/test1/」但還是同樣的錯誤
檢查此答案可能有幫助。 http://stackoverflow.com/questions/20688741/javascript-not-running-on-facebook-iframe/20693413#20693413 – ShapCyber
謝謝ShapCyber,但這篇文章是爲在Facebook上的應用程序,我試圖登錄來自第三方網站。你知道爲什麼我在開發者頁面看到不同的gui,不像@Tommy在這裏? – Dvirski
應用域名錯過 –