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
Twitter oAuth login api using php

Twitter oAuth login api using php

Vetrivel Pandian by Vetrivel Pandian
November 13, 2019
in API's
0

Everyone have account in social networking like twitter, facebook, linkedin etc. In previous article we see google and linkedin login. Now I share with how to login with twitter account. Twitter is on the most people used network this is the reason of now I have develop this article.

Most of website integrate the social network oauth connection because many customers are hate to registeration form. This is the main reason of integrate social networking script in all of websites. Here, I have clearly share this article, how to integrate twitter login form.

You might also like

Login the App using facebook oauth in PHP

Login the App using facebook oauth in PHP

November 29, 2019
0
Tutorial about how to Create Jobs portal using Indeed API

Tutorial about how to Create Jobs portal using Indeed API

October 1, 2019
0

Twitter OAuth Login using PHP

Let’s start our tutorial, just follow my steps to intgrate twitter network

Step 1:

Open official twitter link to create account https://apps.twitter.com/app/new. Page looks like below image,

Twitter oAuth login api using php 1

Step 2:

Enter your application name in the Name field.

Step 3:

Enter the description in the Description field.

Step 4:

Enter your website name in the follwing format http:www.yourdomain.com, it will not allow the localhost server. So just give your website name only it’s a mandatory.

Step 5:

Then give the Callback URL to redirect your website after permission the twitter account.

Step 6:

Finally, accept the Developer Agreement. Then click Create your Twitter Application.

Step 7:

That’s all. Now we are complete the twitter mandatory field to integrate our project.

After create twitter application it will move the next page. It will be like below image,

Twitter oAuth login api using php 2

Step 8:

Click Keys and Access Tokens tab. It will show like below image,

Twitter oAuth login api using php 3

Step 8:

Just copy Consumer API Key and Consumer Secret and paste to your PHP file(config.php).

Database Configuration

Now time to move on database configuration to store the twitter authentication values. First create one database. The database name is twitterlogin. After creating database just click to import users.sql file.

PHP Code for Integrate Twitter

Here, I have include complete source code of this project so you have first download that then open config.php file. The config.php file is,

<?php define('CONSUMER_KEY', 'ZrzMR8ZihvKBEAgxwtTywo6vZ'); define('CONSUMER_SECRET', 'wFNADpQHc5KljhTSi7TD3QJEiUB0ZjDzpfSVYLyf4VrinVA2uk'); define('OAUTH_CALLBACK', 'http://www.w3tweaks.com/twitterlogin/process.php'); ?>

I have include my Consumer Key & Consumer Secret So you have remove that and replace your application keys & give your website redirect URL.

Then open includes folder and open functions.php. Here you have change your database details.

Test the Application

All steps completed, now just run your application. The exact output like,

The homepage like below image,

Twitter oAuth login api using php 4

After click Sign in with Twitter button, you have redirect this page it’s like below image,

Twitter oAuth login api using php 5

Twitter oAuth login api using php 6

That’s all. Still you are struggle to integrate twitter login, feel free to comment below I’ll guide you…

Download Demo

Tags: APIAuthenticatekeyloginoauthphpsecrettokentwitterusers
Previous Post

Develop html table using css div tags

Next Post

Select all and Deselect all checkboxes in angularjs

Vetrivel Pandian

Vetrivel Pandian

Related Stories

Login the App using facebook oauth in PHP

Login the App using facebook oauth in PHP

by W3TWEAKS
November 29, 2019
0
0

In my old articles, we see integration about how to login the apps using social networking in PHP like Twitter,...

Tutorial about how to Create Jobs portal using Indeed API

Tutorial about how to Create Jobs portal using Indeed API

by W3TWEAKS
October 1, 2019
0
0

This tutorial will explain how to create the job seraching portal using Indeed API with advanced search and autocomplete for...

Create Facebook Messenger Chatbot using Node Js

Create Facebook Messenger Chatbot using Node Js

by Urmil Shah
October 1, 2019
0
0

Facebook launched the Messenger Platform, giving developers the ability to create bots that could have a conversation with people on...

How to integrate the login using Google+ plus API in PHP

How to integrate the login using Google+ plus API in PHP

by Vetrivel Pandian
November 29, 2019
0
0

In the previous post we have already see how to integrate the LinkedIn Login with API and now make for...

Next Post
Select all and Deselect all checkboxes in angularjs

Select all and Deselect all checkboxes in angularjs

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