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.
define('APP_ID', '**********'); define('APP_SECRET', '**********************');
This is where your customer’s details will be stored. To create a separate table, use the following code.
CREATE TABLE users ( id INT PRIMARY KEY AUTO_INCREMENT, email VARCHAR(70), oauth_uid VARCHAR(200), oauth_provider VARCHAR(200), username VARCHAR(100), );
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.
<!--?php define('DB_SERVER', 'localhost'); define('DB_USERNAME', 'username'); define('DB_PASSWORD', '*********'); 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.
What Works and What Doesn’t in Social Media Marketing StrategyPosted on Feb 18, 2020 | Digital Marketing
The Past, Present, and Future of Social Media MarketingPosted on Feb 06, 2020 | Digital Marketing