open-social-distributor

LinkedIn

To post to organisation pages, you’ll need create an app in the Developers Portal and then request access to the Community Management API.

To be granted access, you’ll need to link your app to a LinkedIn organisation, and then get that organisation verified.

LinkedIn look for various things when verifying an organisation. It shouldn’t be too painful, particularly if you’re a registered organisation in your country. (We had some difficulty with Front-Line Tech Ltd, but there’s an appeal process, and we were able to show additional documentation to help).

See also:

Quotas

By default (in developer mode), your app will be allowed:

LinkedIn connection strings

type=linkedin;code=<SHORTCODE>;client_id=<CLIENT_ID>;client_secret=<CLIENT_SECRET>;mode=org;author_id=<ORG_ID>;token=<TOKEN>
type=linkedin;code=<SHORTCODE>;client_id=<CLIENT_ID>;client_secret=<CLIENT_SECRET>;mode=user;author_id=<PERSON_ID>;token=<TOKEN>

Org mode

User mode (not yet implemented)

Person ids look like a 10-character string of letters and numbers, eg. vl4hy9pJ3S

To obtain the PERSON_ID, put any value forauthor_id in the connection string, and run a test of your connection using the CLI.

DistributionCLI test -c your/config/file.json

Provided your token, client id and client secret are correct, the output from the test contains the person id you’ll need for User mode.

Tools

For more information, see: LinkedIn OAuth Tools

Obtain client id and secret

The client id and secret for your LinkedIn application are listed in the Auth tab of your Application’s settings in the Developers Portal.

Obtain an access token (the easy, opaque way)

A token grants an app permission to take the actions defined by the scopes on behalf of the user that granted that permission.

Once you have been granted access to the Community Management API, you can obtain a token:

Obtain an access token (the less easy, transparent way)

Step 0 - authorise the OAuth Token Explorer redirect URL

Step 1 - get user authorisation

NB. w_organization_social is the scope for writing social posts on behalf of an organisation, and w_member_social is for individuals. New tokens issued for a LinkedIn application will automatically revoke old tokens, so request the full set of scopes you’ll need together.

You should be sent to a LinkedIn sign in page. Sign in, authorize the app, and you’ll be redirected to the request access token page…

Step 2 - get an access token

The page is largely filled in for you.

You should receive a response in the following format:

{"access_token":"<ACCESS-TOKEN>","expires_in":5183999,"refresh_token":"<REFRESH-TOKEN>","refresh_token_expires_in":31536059,"scope":"w_organization_social"}

From there, you can extract the access token.

NB. The expiry times are in seconds. 5183999 very roughly equates to about 60 days.