我正在使用Facebook PHP SDK来实现与facebook的登录.我想先在当地测试一下.我创建了一个测试应用程序,我尝试了很多东西,但仍然不适合我.
在我的本地,我配置了一个apache虚拟主机,以便我可以使用此URL访问我的本地Web应用程序:http://www.myapplocal.com
这是我在登录Facebook后得到的错误:
Given URL is not whitelisted in Client OAuth Settings: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.
Run Code Online (Sandbox Code Playgroud)
以下是我在oauth设置部分的内容:
Client OAuth Login: yes
Web OAuth Login: yes
Force Web OAuth Reauthentication: no
Embedded Browser OAuth Login: no
Valid OAuth redirect URIs: http://www.myapplocal.com/index.php/facebook-login-callback
Login from Devices: …
Run Code Online (Sandbox Code Playgroud)