LinkedIn share links open the share dialog, allowing users to post your content to their professional network. LinkedIn uses Open Graph tags for the preview, similar to Facebook.
Key Takeaways
- 1Use linkedin.com/sharing/share-offsite with the url parameter
- 2Preview content comes from Open Graph meta tags
- 3LinkedIn caches previews—use Post Inspector to refresh
- 4Works without a LinkedIn app or API key
- 5Great for B2B content and professional articles
Basic Share Link
LinkedIn is the go-to platform for B2B content, professional articles, and industry news. Share links on LinkedIn tend to have higher value for business-focused content because the audience is already in a professional mindset. Getting your share links right can drive significant traffic for thought leadership and product content.
https://www.linkedin.com/sharing/share-offsite/?url=https://example.com/article<a href="https://www.linkedin.com/sharing/share-offsite/?url=https://example.com/article"
target="_blank"
rel="noopener noreferrer">
Share on LinkedIn
</a>This HTML creates a basic share button. When clicked, it opens LinkedIn's share dialog with your URL pre-filled. Users can add their own commentary before posting.
URL Parameters
LinkedIn's current sharing API is remarkably simple with just one parameter. All the preview content comes from your page's Open Graph tags.
| Parameter | Description | Example |
|---|---|---|
url | The URL to share (URL-encoded) | url=https%3A%2F%2Fexample.com |
Previous API Deprecated
The old shareArticle endpoint with title, summary, and source parameters was deprecated in 2018. Use the share-offsite URL with Open Graph tags instead.
Since you can't pass title or description via URL parameters, your Open Graph implementation determines how your content appears on LinkedIn.
Setting Up Open Graph Tags
LinkedIn uses the same Open Graph tags as Facebook for generating share previews. However, the professional audience means you should tailor your descriptions for business value rather than casual engagement.
LinkedIn reads your page's Open Graph tags to generate the share preview:
<head>
<meta property="og:title" content="Your Article Title" />
<meta property="og:description" content="A compelling description for professionals." />
<meta property="og:image" content="https://example.com/professional-image.jpg" />
<meta property="og:url" content="https://example.com/article" />
<meta property="og:type" content="article" />
<!-- LinkedIn-specific (optional) -->
<meta name="author" content="Author Name" />
<meta property="article:author" content="Author Name" />
<meta property="article:published_time" content="2026-01-15T09:00:00Z" />
</head>The article:author and article:published_time tags add credibility to shared content. LinkedIn displays this metadata to help readers evaluate the source.
Image Specifications
LinkedIn's image requirements are similar to Facebook's. Using the right size ensures your share preview looks professional rather than cropped or pixelated.
| Requirement | Specification |
|---|---|
| Recommended size | 1200 x 627 pixels |
| Minimum size | 200 x 200 pixels |
| Aspect ratio | 1.91:1 |
| Format | PNG, JPEG, GIF |
| Max file size | 5 MB |
Professional images with clean branding work best on LinkedIn. Avoid casual or meme-style graphics that might undermine your credibility.
Opening in a Popup
Opening the share dialog in a popup keeps users on your page while they compose their post. This is especially valuable for conversion-focused pages.
function shareOnLinkedIn(url) {
const shareUrl = 'https://www.linkedin.com/sharing/share-offsite/?url=' +
encodeURIComponent(url);
window.open(
shareUrl,
'linkedin-share',
'width=600,height=600,scrollbars=yes'
);
}
// Usage
shareOnLinkedIn('https://example.com/my-article');LinkedIn's share dialog is slightly larger than other platforms, so we use 600x600 pixels to accommodate the full posting interface comfortably.
React Component
For React applications, a reusable component keeps your LinkedIn share buttons consistent across your site. This TypeScript component includes proper typing and styling support.
interface LinkedInShareButtonProps {
url: string;
children: React.ReactNode;
className?: string;
}
function LinkedInShareButton({ url, children, className }: LinkedInShareButtonProps) {
const handleClick = () => {
const shareUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}`;
window.open(
shareUrl,
'linkedin-share',
'width=600,height=600,scrollbars=yes'
);
};
return (
<button onClick={handleClick} className={className}>
{children}
</button>
);
}
// Usage
<LinkedInShareButton url="https://example.com/article">
Share on LinkedIn
</LinkedInShareButton>The component accepts a className prop for styling, making it easy to match your site's design system. The URL is properly encoded in the click handler.
Dynamic Share Links
When building social share toolbars, you often need to generate links for multiple platforms at once. This utility function creates share URLs for all major platforms from a single article URL.
// Generate share links for multiple platforms
function createSocialShareLinks(articleUrl) {
return {
linkedin: `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(articleUrl)}`,
twitter: `https://twitter.com/intent/tweet?url=${encodeURIComponent(articleUrl)}`,
facebook: `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(articleUrl)}`,
};
}
// Usage with current page
const currentUrl = window.location.href;
const shareLinks = createSocialShareLinks(currentUrl);
// Add to share buttons
document.querySelector('.linkedin-btn').href = shareLinks.linkedin;This function returns an object with share URLs for each platform. You can extend it with additional platforms as needed. Using window.location.href automatically shares the current page.
Debugging with Post Inspector
LinkedIn caches your Open Graph data, which can cause problems when you update your page. The Post Inspector tool lets you refresh the cache and preview how your content will appear.
LinkedIn caches your page's Open Graph data. Use the Post Inspector to refresh:
Visit Post Inspector
Go to linkedin.com/post-inspector/
Enter your URL
Paste the URL and click Inspect
Click Refresh
Forces LinkedIn to re-fetch your Open Graph tags
Always use Post Inspector after updating your Open Graph tags. Without refreshing, LinkedIn may display outdated information for up to 7 days.
Best Practices for LinkedIn
LinkedIn's professional audience has different expectations than casual social networks. These guidelines help your shared content perform well in business contexts.
Use professional imagery
Clean, branded images perform better on LinkedIn's professional network.
Write compelling descriptions
150-200 characters works best. Focus on value for professionals.
Include article metadata
Author name and publish date add credibility to shared content.
With these best practices, your LinkedIn share buttons will help spread your professional content effectively across the world's largest professional network.
Try the URL Builder
Use our LinkedIn Share template to build share links interactively.