/facebook_login

Facebook_login

Primary LanguagePHP

Installation
1. Step one - Setting up your MySQL tables
Open and execute the file called “dump.sql” situated in the “include” folder. Copy paste and run the content into your PHPMyAdmin in order to create the necessary tables used by the app.
Once done verify that you have the new tables created.
2. Step 2
Copy all the “facebook_login” folder into your server, and open the “include/config.php”.
This file contains all the settings that you will need to define. Please jump to the next page for the configuration.
Configuration of your Facebook app
Please note that you need to create a Facebook application on this URL:
https://developers.facebook.com/apps
Make sure when creating a new application to define the “App domain”, and in the “select how your app integrate with Facebook” section, select “Website with Facebook login” and define your “Site URL”.
You should get your Facebook app id and app secret to be used later on in the PHP configuration file.
Important
1. If you are using a www. for your site, make sure the app domain starts with a www. and your site URL starts with a http://www. as well. If you are not using a www. for your site don’t specify any www. in your Facebook app settings.
2. Don’t forget to define your own app domain

Configure the app on your server
You need to open the file “include/config.php”. All the settings are centralized into that single
file.
Settings you need to define
$GLOBALS['app_folder']
The folder where your app can be accessed on your server. Leave it empty if you app is on the root of your domain name. Should not have any slash at the end.
Ex: $GLOBALS['app_folder'] = '/products/facebook_login';
$GLOBALS['app_domain_url']
Your domain URL (without a slash at the end). Make sure you don’t define a www if you access you domain without a www, and define a www if you access you pages with a www. In our example, no www is used before the domain name.
Ex: $GLOBALS['app_domain_url'] = 'http://yougapi.com';
Your MySQL database information
$GLOBALS['db_host'] = 'your_host'; $GLOBALS['db_name'] = 'your_database_name'; $GLOBALS['db_user'] = 'your_database_user'; $GLOBALS['db_password'] = 'your_database_password';
Your Facebook app information.
You need to define your Facebook app id and app secret.
define('FACEBOOK_APP_ID', 'here_comes_your_App_ID'); define('FACEBOOK_SECRET', 'here_comes_your_App_Secret');
Super admin user
You can define the super admin, it’s a user you can user to login to the secure space and be able to manage the other users.
$GLOBALS['admin_username'] = 'admin';
$GLOBALS['admin_password'] = 'admin';