As per this article, LinkedIn is supporting open graph meta tags for link preview. I have added all required meta tags in the head section of my HTML page.
ie.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- Primary Meta Tags -->
<title>This is sample title</title>
<!-- Open Graph / Facebook / LinkedIn -->
<meta property="og:type" content="website">
<meta property="og:title" content="This is sample title">
<meta property="og:description" content='sample description'>
<meta property="og:image" content="image path">
</head>
<body></body>
</html>
But when I share my link on LinkedIn, LinkedIn does not fetch a description in the link preview.
The same link is working fine on Facebook as Facebook also supports open graph meta tags.
Am I missing something?
Is there any type of validation for description?
Only one of these tags will display...
(list here is with higher-priority items at the top)
<meta property='og:image' content='//media.example.com/ 1234567.jpg"/>
<meta property='og:description' content='Description that will show in the preview"/>
You CANNOT display image AND description. You can display image, or description, but not both.
Source: LinkedIn Support Ticket #200531-001886.
That is probably your problem.
If you're absolutely uncertain why the LinkedIn preview for sharing your page isn't populating correctly, try each of the following:
og:
tags.example.com
, check example.com?someFakeArgument=Fake
, which is a different URL and should trigger a cache miss.There are many ways to set this data. I have seen the following picked up: standard HTML <head>
tags, oEmbed data, API post config (requires appid), and the classic og:
tags, as we are dealing with.
You may have any of the following tags....
<meta property='og:title' content='Title of the article"/>
<meta property='og:url' content='//www.example.com/URL of the article" />
Source: Official Microsoft LinkedIn Documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With