Bladephp: Now with 7+ codeigniter, php, and laravel project 7+ php project From $18/Year From Rs. 1000/Year

How to Login With LinkedIn Using PHP

by
Category:php
php
How to Login With LinkedIn Using PHP

Linkedin is one of the most popular social networks with the huge user base. If you want to allow your website’s user to login with the social account, LinkedIn login needs to be added. LinkedIn provides various API to integrate user login system in the website. Using LinkedIn API you can let the user login to your website with their LinkedIn account. You may also like How to Login with Google Account in CodeIgniter and How to Login with Facebook in CodeIgniter.

PHP Code

<?php
session_start();
include_once 'oAuth/config.php';
include_once 'oAuth/linkedinoAuth.php';

$linkedin = new LinkedIn($config['linkedin_access'], $config['linkedin_secret'], $config['base_url'] . 'linkedin_login_oauth/linkedinauth.php' );

$linkedin->getRequestToken();
$_SESSION['requestToken'] = serialize($linkedin->request_token);
header("Location: " . $linkedin->generateAuthorizeUrl());
?>

0 Comments


Html code work in comment box


Related Post