w3tweaks
  • Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Scripts
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube
w3tweaks
  • Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Scripts
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube
w3tweaks
Home API's
Login the App using facebook oauth in PHP

Login the App using facebook oauth in PHP

W3TWEAKS by W3TWEAKS
November 29, 2019
in API's, php
0

In my old articles, we see integration about how to login the apps using social networking in PHP like Twitter, LinkedIn, Google Plus. In this tutorial, I’ll be sharing how to integrate Facebook login with oauth in PHP. Facebook is one of the biggest network and everyone using Facebook account. So now I have develop this article to integrate with oauth connection using PHP. Download the zip (*.zip)

You might also like

PHP Login system

13 Best PHP Login system

January 14, 2021
0
Collection of PHP Libraries for sending and parsing email

8 PHP Libraries for sending and parsing email

May 9, 2020
0

DownloadGitHub

Before running the code we have to create Facebook App id. Follow the below steps to get one for you.

Create Facebook App id and Secret

First, you have to create one app id with facebook developer dashboard. Follow the steps

  1. Open https://developers.facebook.com/apps/
  2. Click Register Now Button
  3. Enter you details and give you app name & app url
  4. Once the app created, you will be redirected to like below screenshot
    facebook create app id screenshot
  5. Copy App ID and App Secret

Facebook OAuth Configuration with Source Code

Below steps will explain you how to setup the Facebook OAuth using the downloaded source code.

Database Configuration

  1. Create the database name, Ex: facebooklogin
  2. You can find users.sql from downloaded source code and import the file in facebooklogin database.
  3. Once the import is done, then we are done with database setup

Configuration and setup FB API in source code

We done with DB setup. Now we have to change the db name, fb appid and app secret in downloaded source code to run the code successfully. follow the below steps.

  • Open User.php file and replace the database name with the one you created
  • Open fbConfig.php file and change the FB appid and app secret id with one you have created

So we all set with configuration steps and we ready to run the code. Once you successfully configured you will see the page like below screenshot.

Allow user to login the page using facebook

Please share and comment

Tags: demofacebookfbloginoauthphptutorial
Previous Post

ReactJs: YouTube Instant search working with API

Next Post

Single Element, Multi Coloured 3D Text Effect

W3TWEAKS

W3TWEAKS

Since I've had a strong background in front-end development, I took the initiative to start my own website (w3tweaks.com) to share my knowledge with the world.

Related Stories

PHP Login system

13 Best PHP Login system

by W3TWEAKS
January 14, 2021
0
0

Find the collection of Hand-Picked free PHP Login system. Scripts all developed using PHP, MySql (Database), HTML, and CSS. Below...

Collection of PHP Libraries for sending and parsing email

8 PHP Libraries for sending and parsing email

by W3TWEAKS
May 9, 2020
0
0

Collection of PHP Libraries for sending and parsing email. CssToInlineStyles class PHP CssToInlineStyles is a class to convert HTML into HTML...

PHP Content Management Systems

8 PHP Content Management Systems (CMS)

by W3TWEAKS
May 9, 2020
0
0

Find the collection of PHP Content Management Systems. Back Drop CMS The free and Open Source CMS that helps you...

List of all PHP Operators

List of all PHP Operators

by W3TWEAKS
August 14, 2019
0
0

An operator is something that takes one or more values (or expressions, in programming jargon) and yields another value (so...

Next Post
Single Element, Multi Coloured 3D Text Effect

Single Element, Multi Coloured 3D Text Effect

Discussion about this post

We bring you the best frontend collections that will fix perfect for news, magazine, personal blog, etc. Check our landing page for details.

  • Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Scripts
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube