Table of Contents
We all know that Facebook is the largest and most popular social media of all, and you can guarantee that all of your visitors do have a Facebook account. And when it takes to get the details of your customers, people do not want to spend time on filling the big sign up forms. This can make a huge bounce backing of a large portion of lazy audience. Now you can implement a better way of collecting the customer details with an easy one click Facebook app allowing feature. You get to store the customer details on your database with this easy step. So let us look how to implement the sign in with Facebook, along examining the required files and its importance.
We now look the basic php files needed to implement the sign in with Facebook feature on your website. After that you have downloaded the set of files on Sign in with Facebook, you can unzip to get a folder with arranged php files.
On the main folder you will find:
On the other folders you will find
You must create an Facebook app by going to the developer section of Facebook at facebook app builder. Fill in the fields accordingly with adding your website URL too.
Once you create the app, you will get an APP ID and SECRET ID, which you need to be added in the files stated above named fbconfig.php in the config folder.[code] define(‘APP_ID’, ‘**********’);
This is where your customer’s details will be stored. To create a separate table, use the following code.[code] CREATE TABLE users
id INT PRIMARY KEY AUTO_INCREMENT,
Once the files are edited, you are eady to hosted those files in your web server.
You can copy the files to the root directory and change the database accordingly.[code] <!–?php define(‘DB_SERVER’, ‘localhost’);
define(‘DB_DATABASE’, ‘db name’);
$connection = mysql_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD) or die(mysql_error());
$database = mysql_select_db(DB_DATABASE) or die(mysql_error());
Hope you have got easy steps to implement the sign in with Facebook feature on your website. With this your visitors finds it easy to spend more time on the website. Comments and Suggestions welcomed.
Contact us and we'll give you a preliminary free consultation
on the web & mobile strategy that'd suit your needs best.
How to Search Engine Optimize Your Website for mobile?Posted on Mar 14, 2018 | Digital Marketing