1) Register your app on FB

a) goto
b) create a new app b.1) Provide appropriate name to your fb app
b.2) in the next screen click on the “Website with Facebook Login Log in to my website using Facebook.”
b.3) Then enter the site url where this folder will be extracted.i.e /facebook-php-sample-app
b.4) In my case it was
b.5) Save Changes
2) Goto config.php in facebook-php-sample-app

a) update appId and secret values for your app.
3) Modify constants.php in facebook-php-sample-app

4) thats it.
For any issues or concerns contact me at or

You can download the code from the Github library