rishats / linkedin-php
PHP library for LinkedIn
Installs: 1 498
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- php: >=7.0
- ext-curl: *
- ext-json: *
- league/oauth2-linkedin: ^4.1
- symfony/property-access: ^3.4
- symfony/property-info: ^3.4
- symfony/serializer: ^3.4
Requires (Dev)
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2024-11-09 19:30:24 UTC
README
PHP client for LinkedIn API V2.
Requirements
- php >= 7.0
Installation
composer require rishats/linkedin-php:"dev-master"
Using LinkedIn API
To work with LinkedIn API have to init Client
classes.
$client = new Client('appId', 'appSecret', 'returnUrl');
Authentication
$client = new Client('appId', 'appSecret', 'returnUrl'); if ($_GET['code']) { $client->initToken($_GET['code']); $me = new Me($client); } else { $authUrl = $client->getAuthorizationUrl([ 'scope' => [Client::PERMISSION_LITE_PROFILE] ]); header('Location: '.$authUrl); exit; }