LinkedIn doesn't fetch metadata when sharing website

拥有回忆 提交于 2019-12-08 15:16:53

问题


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.


回答1:


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)




回答2:


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 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>



回答3:


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/'/>



回答4:


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/



来源:https://stackoverflow.com/questions/35201679/linkedin-doesnt-fetch-metadata-when-sharing-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!