Skip to content

Instantly share code, notes, and snippets.

Created January 9, 2018 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f2b8c2ee4e073ed2fda5e1b275f78bc4 to your computer and use it in GitHub Desktop.
Save anonymous/f2b8c2ee4e073ed2fda5e1b275f78bc4 to your computer and use it in GitHub Desktop.
Facebook Php Login
********************
Facebook Php Login ->>->>->>
********************
http://shurll.com/bzgvw
(Copy & Paste link)
********************
In User.php file, you only need to specify your MySQL database credentials ($dbHost, $dbUsername, $dbPassword, and $dbName) and table name ($userTbl) where you want to store the users Facebook profile information. .. About Us Privacy Policy Terms & Conditions Write For Us Advertise Contact . The following SQL creates a users table with some basic fields in the database to hold the Facebook profile information. .. Facebook Login allow users to sign into your website using their Facebook account credentials without sign up on your website. See this step-by-step guide to create and configure the Facebook App October 23, 2017 at 6:16 PM Abiola Oyeniyi Said. Login With Facebook. August 2, 2017 at 4:41 PM Shaun Said. Please try again.BirthdayMonthJanFebMarAprMayJunJulAugSepOctNovDecDay12345678910111213141516171819202122232425262728293031Year201820172016201520142013201220112010200920082007200620052004200320022001200019991998199719961995199419931992199119901989198819871986198519841983198219811980197919781977197619751974197319721971197019691968196719661965196419631962196119601959195819571956195519541953195219511950194919481947194619451944194319421941194019391938193719361935193419331932193119301929192819271926192519241923192219211920191919181917191619151914191319121911191019091908190719061905Why do I need to provide my birthday?FemaleMaleBy clicking Create Account, you agree to our Terms and that you have read our Data Policy, including our Cookie Use. To get started with the latest version of Facebook SDK v5.0, make sure your system meets the following requirements. Create a new Facebook apps with your desired name (like WebLogin). October 11, 2017 at 6:59 PM Mohamed Said. Share photos and videos, send mess. ';}}else{//Getloginurl$loginURL=$helper->getLoginUrl($redirectURL,$fbPermissions);//Renderfacebookloginbutton$output=' ';}?> Login with Facebook using PHP by CodexWorld h1{font-family:Arial, Helvetica, sans-serif;color:#999999;} Logout (logout.php) When the user wishes to logout from their account, the logout.php file will be loaded after logout from Facebook account. Finally fbconfig.php file as shown below −. great work thanx. 5,464 likes 8 talking about this. Login page Overview. How can i get a bigger version of facebook profile picture. Toggle navigation Tutorials PHP WordPress Drupal CodeIgniter CakePHP How ToDemosScriptsDealsServicesWeb Tools . The mbstring extension should be enabled. Hi, I have FB and Google login working together on the same page, but the FB logout breaks when Fb and Google logins are both on the same page. db)){//Connecttothedatabase$conn=newmysqli($this->dbHost,$this->dbUsername,$this->dbPassword,$this->dbName);if($conn->connecterror){die("FailedtoconnectwithMySQL:".$conn->connecterror);}else{$this->db=$conn;}}}functioncheckUser($userData=array()){if(!empty($userData)){//Checkwhetheruserdataalreadyexistsindatabase$prevQuery="SELECT*FROM".$this->userTbl."WHEREoauthprovider='".$userData['oauthprovider']."'ANDoauthuid='".$userData['oauthuid']."'";$prevResult=$this->db->query($prevQuery);if($prevResult->numrows>0){//Updateuserdataifalreadyexists$query="UPDATE".$this->userTbl."SETfirstname='".$userData['firstname']."',lastname='".$userData['lastname']."',email='".$userData['email']."',gender='".$userData['gender']."',locale='".$userData['locale']."',picture='".$userData['picture']."',link='".$userData['link']."',modified='".date("Y-m-dH:i:s")."'WHEREoauthprovider='".$userData['oauthprovider']."'ANDoauthuid='".$userData['oauthuid']."'";$update=$this->db->query($query);}else{//Insertuserdata$query="INSERTINTO".$this->userTbl."SEToauthprovider='".$userData['oauthprovider']."',oauthuid='".$userData['oauthuid']."',firstname='".$userData['firstname']."',lastname='".$userData['lastname']."',email='".$userData['email']."',gender='".$userData['gender']."',locale='".$userData['locale']."',picture='".$userData['picture']."',link='".$userData['link']."',created='".date("Y-m-dH:i:s")."',modified='".date("Y-m-dH:i:s")."'";$insert=$this->db->query($query);}//Getuserdatafromthedatabase$result=$this->db->query($prevQuery);$userData=$result->fetchassoc();}//Returnuserdatareturn$userData;}}?> Facebook API Configuration (fbConfig.php) In fbConfig.php file, define Facebook App ID ($appId), App Secret ($appSecret), Callback URL ($redirectURL), and Permissions ($fbPermissions) to connect with Facebook API and working with SDK. Petmalu. We can use Facebook login to allow the users to get access into the websites. Thanks July 14, 2017 at 8:56 PM Jony Sheikh Said. Sign UpIts free and always will be.JavaScript is disabled on your browser.Please enable JavaScript on your browser or upgrade to a JavaScript-capable browser to register for Facebook.An error occurred. Also, localhost domain will only work, once you add platform. Now click on Status & Review link from the left side menu panel and make your apps live. Facebook gives people the power to share and makes the world. Facebook - Log In or Sign Up Create an account or log into Facebook. CREATE TABLE users ( id int(11) NOT NULL AUTOINCREMENT, oauthprovider enum('','facebook','google','twitter') COLLATE utf8unicodeci NOT NULL, oauthuid varchar(100) COLLATE utf8unicodeci NOT NULL, firstname varchar(50) COLLATE utf8unicodeci NOT NULL, lastname varchar(50) COLLATE utf8unicodeci NOT NULL, email varchar(100) COLLATE utf8unicodeci NOT NULL, gender varchar(10) COLLATE utf8unicodeci NOT NULL, locale varchar(10) COLLATE utf8unicodeci NOT NULL, picture varchar(255) COLLATE utf8unicodeci NOT NULL, link varchar(255) COLLATE utf8unicodeci NOT NULL, created datetime NOT NULL, modified datetime NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8unicodeci; Facebook SDK for PHP v5.0 The facebook-php-sdk/ directory contains the latest version (v5) of Facebook SDK for PHP 5a02188284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment