Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LinkedIn doesn't fetch metadata when sharing website

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.

like image 449
Yngve Høiseth Avatar asked Feb 04 '16 12:02

Yngve Høiseth


2 Answers

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)

like image 84
dev_masta Avatar answered Oct 10 '22 04:10

dev_masta


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>
like image 37
zanona Avatar answered Oct 10 '22 06:10

zanona