Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add title and description with LinkedIn share button

I am using a simple JavaScript popup window to display a Share with LinkedIn dialog, based on the solution in this thread: How to make a custom LinkedIn share button.

https://www.linkedin.com/cws/share?url=http%3A%2F%2Fgoogle.com

I was wondering if there is any way to add a title and description to the query string? I noticed that when you do this with the google example it automatically pulls in this information. Any help is appreciated.

like image 904
Drew Avatar asked Nov 28 '12 14:11

Drew


People also ask

How do I add a share button on LinkedIn?

To generate a Facebook Share Button, visit https://developers.facebook.com/docs/plugins/share-button and specify the URL you want people to share as well as the width. Then generate the code, and paste it into your site where you want the button to appear.

Why can't I share a link on LinkedIn?

URLs with spaces in them can't be shared on LinkedIn and will result in an error. To make the URL shareable on LinkedIn, you can ask the website owner to encode the white space or remove the spaces from the URL.


2 Answers

http://www.linkedin.com/shareArticle?mini=true&url=http://example.com/adaptxt-beta-android&title=http://example.com/adaptxt-beta-android&summary=http://example.com/adaptxt-beta-android&source=http://example.com/adaptxt-beta-android

You mean this? LinkedIn share article script.

like image 184
imDingo Avatar answered Nov 10 '22 01:11

imDingo


The only parameter supported by the LinkedIn share url is url, so, try something like this...

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

Official Microsoft LinkedIn Share API Documentation. Take a look here, you'll see that LinkedIn no longer supports a summary, title, or other parameters. Only url.

They used to support other parameters, though. But they seemed to have changed with Microsoft's acquisition of LinkedIn. Wished someone updated you on that? 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

like image 25
HoldOffHunger Avatar answered Nov 09 '22 23:11

HoldOffHunger