How to create a simple share linkedIn link?

I use this very simple sharer:

<a href="https://www.linkedin.com/sharing/share-offsite/?url=your-url-here.com"target="_blank" title="Share on LinkedIn">
Share on LinkedIn
</a>

This is how it looks like: Example of using simple LinkedIn sharer in Google Chrome


I think the problem is you are not doing it in the way linkedin asked to you. You should always refer to API docs first. For example below linkedin describe how you can generate Share Plugin for your site.

Share Plugin Generator

and the code generated is looks like:

<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<script type="IN/Share" data-url="Your_URL_Here" data-counter="top"></script>

Also you can do it in following way:

https://www.linkedin.com/shareArticle?mini=true&url=http://developer.linkedin.com&title=LinkedIn%20Developer%20Network&summary=My%20favorite%20developer%20program&source=LinkedIn

Reference: Share on Linkedin

Your link will look like:

https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>&title=Some%20Title&summary=Some%20Summary&source=YourWebsiteName

Where mini parameter is for: A required argument who's value must always be: true

and Source is: The url-encoded source of the content (e.g. your website or application name) Please let me know if you still needs to know how it will work for you.

And all parameters must be URL Encoded.


You can just change in onclick url linkedin 'share?url=' to 'shareArticle?mini=true&', i think it's help.

<a class="btn btn-default icon" href="javascript:void(0)" onclick="window.open( 'http://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>', 'sharer', 'toolbar=0, status=0, width=626, height=436');return false;" title="Linkedin"><span class="character">j</span></a>