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 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()); ?>