12

I'm having issues with sharing a website I'm working on on LinkedIn: LinkedIn doesn't fetch any data from the page. The site's metadata follows the recommendations in their docs. I tried all these suggestions.

In addition, I investigated the following:

  1. Serving content over HTTP instead of HTTPS, but a lot of other sites served over HTTPS, such as https://stripe.com/no and https://www.facebook.com/, work perfectly fine.
  2. Posting as a company page. This didn't make any difference, other than allowing manual data entry (which is handy as a makeshift solution).
  3. Posting as a different user. Didn't make any difference.
  4. Posting new content on the website to make sure that the metadata hadn't been cached by LinkedIn. This also didn't make any difference.
  5. This was also a problem before I added the Open Graph meta tags.

This might be a problem caused by LinkedIn, but – considering that this works for other sites – I'm open to the possibility that I'm the one doing something wrong.

Community
  • 1
  • 1
Yngve Høiseth
  • 570
  • 6
  • 26

5 Answers5

9

I don't think you will see any changes in the data that LinkedIn grabs from your website for about a week:

The first time that LinkedIn's crawlers visit a webpage when asked to share content via a URL, the data it finds (Open Graph values or our own analysis) will be cached for a period of approximately 7 days.

This means that if you subsequently change the article's description, upload a new image, fix a typo in the title, etc., you will not see the change represented during any subsequent attempts to share the page until the cache has expired and the crawler is forced to revisit the page to retrieve fresh content.

https://developer.linkedin.com/docs/share-on-linkedin (scroll to the bottom)

Community
  • 1
  • 1
dev_masta
  • 901
  • 8
  • 16
  • I already tried publishing new content, so the caching shouldn't be an issue. (See point 4 above.) – Yngve Høiseth Feb 09 '16 at 07:17
  • 2
    well, it seems to be a known issue with LinkedIn. Likely that they haven't corrected. My website link is not updated even after 3 weeks. Only way for me was to modify the url a little by appending a get parameter. https://test.com/?1 Let me know if there is alternate solution – mythicalcoder May 02 '17 at 13:18
1

In my case it seemed that LinkedIn Parser is really poor to the point that if your HTML file doesn't have the <head> tag (which is not required by the spec) It will simply ignore everything where the bellow wouldn't work

<!doctype html>
<meta charset=utf-8>                                                            
<meta property=og:title content='My Shared Article Title'>                      
<meta property=og:description content='Description of shared article'>          
<meta property=og:image content=http://i.imgur.com/12345.jpg>                
<meta name=description content='Nice description'>
<title>TEST 15</title>
<p>content here</p>

But simply adding the opening <head> tag (still valid HTML), did the trick

<!doctype html>
<head>
<meta charset=utf-8>                                                            
<meta property=og:title content='My Shared Article Title'>                      
<meta property=og:description content='Description of shared article'>          
<meta property=og:image content=http://i.imgur.com/12345.jpg>                
<meta name=description content='Nice description'>
<title>TEST 15</title>
<p>content here</p>
Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215
zanona
  • 12,345
  • 25
  • 86
  • 141
  • you shout close the head after the title and add a body tag before your first content! – Philip Oct 27 '17 at 07:43
  • It’s actually fine to omit the closing tag, @PhilipMiglinci. (Though the advantage of saving a couple of bytes is rather trivial.) – ACJ Feb 06 '18 at 14:44
  • Ran into this recently where my site's minifier had a flag on that stripped out "unnecessary" tags that aren't in the official html spec, so was getting removed. Turned off the flag and worked instantly. – slawder Jan 15 '19 at 01:39
0

I was having the exact same issue. Clear your cache history. Then add this 'prefix="og: http://ogp.me/ns#'" to each metadata tag, and it will work immediately:

    <meta prefix="og: http://ogp.me/ns#" property='og:title' content='Content Title'/>
    <meta prefix="og: http://ogp.me/ns#" property='og:image' content='https://images.url...'/>
    <meta prefix="og: http://ogp.me/ns#" property='og:description' content='Description'/>
    <meta prefix="og: http://ogp.me/ns#" property='og:url' content='https://site_url/'/>
Gabi
  • 139
  • 1
  • 3
0

This will fix it for you just enter your website into here and it seems to clear their cache which in my case was about 3 years old cache ???

https://www.linkedin.com/post-inspector/inspect/

Matt Hough
  • 21
  • 2
0

As in all things programming, let's first look at the Official LinkedIn Sharing Documentation! The LinkedIn share API will respect the following og: tags in your HTML...

  • <meta property='og:title' content='Title of the article"/>
  • <meta property='og:image' content='//media.example.com/ 1234567.jpg"/>
  • <meta property='og:description' content='Description that will show in the preview"/>
  • <meta property='og:url' content='//www.example.com/URL of the article" />

Want to be sure you're using it right? That's easy -- check out the Official LinkedIn Post Inspector to have your share URL debugged, checked, and verified.

HoldOffHunger
  • 18,769
  • 10
  • 104
  • 133