PHPackages                             smartstrategy/linkedin-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. smartstrategy/linkedin-php

ActiveLibrary[API Development](/categories/api)

smartstrategy/linkedin-php
==========================

PHP library for LinkedIn

19PHP

Since Aug 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/SMarTStrategy/linkedin-php)[ Packagist](https://packagist.org/packages/smartstrategy/linkedin-php)[ RSS](/packages/smartstrategy-linkedin-php/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

smart/linkedin-php
==================

[](#smartlinkedin-php)

PHP client for LinkedIn API V2.

Requirements
------------

[](#requirements)

- php &gt;= 7.0

Installation
------------

[](#installation)

```
composer require smart/linkedin-php:"dev-master"
```

Using LinkedIn API
------------------

[](#using-linkedin-api)

To work with LinkedIn API have to init `Client` classes.

```
$client = new Client('appId', 'appSecret', 'returnUrl');
```

Authentication
--------------

[](#authentication)

```
$client = new Client('appId', 'appSecret', 'returnUrl');
if (array_key_exists('code', $_GET)) {
    $client->initToken($_GET['code']);

    $me = new Me($client);
} else {
    $authUrl = $client->getAuthenticationUrl([
        'scope' => [Client::PERMISSION_LITE_PROFILE]
    ]);
    header('Location: '.$authUrl);
    exit;
}
```

Share
-----

[](#share)

There is possibility to publish a new post or share a post on LinkedIn activities

To share a post:

```
$client = new Client('appId', 'appSecret', 'returnUrl');
if (array_key_exists('code', $_GET)) {
    $client->initToken($_GET['code']);

    $shares = new Shares();
    $shares->setResharedShare('urn:li:share:1232132') // Post's urn:id

    $shares->setOwner('urn:li:person:c7RFYxyz78')

    $shareText = new ShareText();
    $shareText->setTitle('my title');

    $shares->setText($shareText);

    $shareEndpoint = new SMarT\LinkedIn\Endpoint\Share($client);
    $shareEndpoint->postShares($shares);
} else {
    $authUrl = $client->getAuthenticationUrl([
        'scope' => [Client::PERMISSION_LITE_PROFILE, Client::PERMISSION_W_MEMBER_SOCIAL]
    ]);
    header('Location: '.$authUrl);
    exit;
}
```

Before to perform this operation, the user declared in `setOwner` must be authenticated in LinkedIn's application.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11536977?v=4)[Giovanni Albero](/maintainers/giovannialbero1992)[@giovannialbero1992](https://github.com/giovannialbero1992)

---

Top Contributors

[![giovannialbero1992](https://avatars.githubusercontent.com/u/11536977?v=4)](https://github.com/giovannialbero1992 "giovannialbero1992 (3 commits)")

### Embed Badge

![Health badge](/badges/smartstrategy-linkedin-php/health.svg)

```
[![Health](https://phpackages.com/badges/smartstrategy-linkedin-php/health.svg)](https://phpackages.com/packages/smartstrategy-linkedin-php)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
