2015-06-17 54 views
1

我使用O2 Qt/C++ lib(建議在http://oauth.net/2/)從默認瀏覽器使用Facebook,Google等帳戶登錄我的應用程序。由於某種原因,Facebook在不久前停止了工作。我得到(對不起,無法粘貼圖像):Facebook桌面登錄OAuth2(重定向到本地)問題

Facebook Login 

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. 

Email or Phone: ________ 
Password: _________ 

如果我沒有登錄到Facebook。如果我已在我的默認瀏覽器中登錄Facebook,一切都可以。

網址是:https://www.facebook.com/dialog/oauth?response_type=token&client_id=my_application_id&redirect_uri=http://127.0.0.1:some_port_1/&scope=email

我所知,在高級選項卡中的OAuth設置,我甚至增加了一些額外的項目有:

Client OAuth Login - YES 
Embedded browser OAuth Login - YES 
Valid OAuth redirect URIs 
https://www.facebook.com/connect/login_success.html 
https://my.some_site_1.com/oauth/facebook 
https://my.some_site_2.com/oauth/facebook 
http://127.0.0.1/ 
http://127.0.0.1:some_port_1/ 
https://my.some_site_1.com/oauth/facebook/ 
https://my.some_site_2.com/oauth/facebook/ 

還是W/O任何成功。

Facebook是否限制127.0.0.1 redirect_uri或者我缺少重要的東西?我需要任何額外的重定向URI嗎?

我真的很感謝任何幫助!

回答

2

它應該是「localhost」而不是「127.0.0.1」。我在Facebook OAuth設置中的「網站」部分以及在OAuth庫本身定義的C++中更改了它,並且它工作正常。