Skip to content

Instantly share code, notes, and snippets.

@McKinneyDigital
Created June 6, 2012 20:26
Show Gist options
  • Save McKinneyDigital/2884521 to your computer and use it in GitHub Desktop.
Save McKinneyDigital/2884521 to your computer and use it in GitHub Desktop.
Share to Linkedin using Javascript
// Opens a pop-up with a Linkedin share dialog
var url = "http://google.com";
var title = "Replace this with a title.";
var text = "Replace this with your share copy.";
window.open('http://www.linkedin.com/shareArticle?mini=true&url='+encodeURIComponent(url), '', 'left=0,top=0,width=650,height=420,personalbar=0,toolbar=0,scrollbars=0,resizable=0');
@RishabhS7
Copy link

Text and title should also be displayed along with the link when the share popup of LinkedIn appears. Do we have solution for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment