Nowadays social media login are everywhere and users are not interested in filling a lengthy form to register. Most of the popular websites are already providing Facebook login feature. So in this post, I would like to show you, Facebook login integration steps using PHP.
To get started with the latest version of Facebook SDK v5.X, make sure your system meets the following requirements.
PHP version should be 5.4 or greater.
mbstring extension should be enabled.
This post assumes that you have prior knowledge of the composer. So let’s get started.
Step 1: Goto https://developers.facebook.com/apps/ and Click Add a New App .
» Choose Website
» Choose Name for you App and Click Create New Facebook App ID
» Choose a category for you App and click Create App ID
» Now Click Skip Quick Test
Step 2 Under settings, Provide values for App domain ( Eg: arjunphp.com ) and Contact Email and click Add Platform.
Provide Values for Site URL and Mobile site URl ( Optional )
Step 3 By default your app enabled for sandbox mode you need to change it to live. To make it live, click on Status & Review tab and click the button to make you App live.
That’s it App settings done now come to the coding.
Step 4 The Facebook PHP SDK can be installed with Composer. Run this command:
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.