George Huang
George Huang

Reputation: 2523

Share A Post or Link on LinkedIn (HTML?)

We would like to let our internal users share a post to their own LinkedIn account.

I followed the directions step-by-step from the site below:

https://tome.oauth.io/providers/linkedin/share-a-link?utm_source=coderwall&utm_medium=post&utm_content=share-post-linkedin

Their sample code works, however, when I replace their public key with mine, the linkedIn authentication box threw me an error message:

You need to pass the "client_id" parameter

Can any of you please help?

Or can I just use their public key, will that work?

Furthermore, it seems we can only share plain text content to LinkedIn, is it possible to share HTML contents to linkedIn?

Upvotes: 0

Views: 2287

Answers (1)

HoldOffHunger
HoldOffHunger

Reputation: 20946

To share a URL on LinkedIn, all you need is:

https://www.linkedin.com/sharing/share-offsite/?url={url}

Source: Microsoft LinkedIn Share URL Documentation.

Only the url parameter is supported.

For example, this works for me:

https://www.linkedin.com/sharing/share-offsite/?url=http://www.wikipedia.org/

Works fine:

If you are interested in a regularly maintained GitHub project that keeps track of this so you don't have to, check it out! Social Share URLs

Social Share URLs Image

Upvotes: 1

Related Questions