PHP code example of mediadesk / linkedin-manager

1. Go to this page and download the library: Download mediadesk/linkedin-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mediadesk / linkedin-manager example snippets

sh
php artisan vendor:publish --tag=mediadesk-linkedin
sh
$linkedin_agent = new LinkedinAgent();
$loginUrl       = $linkedin_agent->getLoginUrl();
sh
$linkedin_agent = new LinkedinAgent();
$access_token   = $linkedin_agent->getAccessToken($code, $state);
sh
$linkedin_profile = $linkedin_agent->getProfile($access_token);
$member_id        = $linkedin_profile->getMemberId();
$name             = $linkedin_profile->getName();
$profile_image    = $linkedin_profile->getProfileImage();