Skip to content

Instantly share code, notes, and snippets.

View AlpeshKatariya's full-sized avatar
🇮🇳
I may be slow to respond.

Alpesh Katariya AlpeshKatariya

🇮🇳
I may be slow to respond.
View GitHub Profile
@AlpeshKatariya
AlpeshKatariya / Home.php
Created December 5, 2017 10:57
About CodeIgniter Facebook login controller
public function Facebook(){
$userData = array();
// Check if user is logged in
if($this->fb_library->is_authenticated()){
// Get user facebook profile details
$userProfile = $this->fb_library->request('get', '/me?fields=id,first_name,last_name,email,gender,locale,picture');
// Preparing data for database insertion
$userData['Auth_Provider'] = 'FB';
$userData['Auth_Id'] = $userProfile['id'];