In this tutorial , I will take you through as how can you make an application wherein you login with Facebook.
We will be using Facebook Graph API for this purpose.
You need to follow the below steps to get started.
- Visit https://developers.facebook.com/apps and click Create New App.
- You will then get an App ID & Secret to be used for your current application.
- Download the zip file from here.Then extract it and copy to your root directory.
- Edit config.php and change App ID & Secret to these values.
- Also change callback url to have your site path.
- Access index.php via your browser.
That’s all when you click on login with facebook button , you will be redirected to Facebook’s login page.After entering your proper credentials , you will be redirected to your site.
You will also have to add a logout button on your web page.However I have written the code in the file to logout.