I am using the PHP PHP SDK to implement login using facebook. And I want to check it out locally first. I created a test application and I tried a lot, but still does not work for me.
In my local, I configured the apache virtual host so that I can access my local web application with this URL: http://www.myapplocal.com
Here is the error I get after logging in to 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.
And here is what I have in the oauth settings section:
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: no
And here is what I have in the "Basic" section ( https://developers.facebook.com/apps/appid/settings/basic/ ):
Namespace: App domains: www.myapplocal.com Site Url: http:
php facebook-php-sdk
Adam tong
source share