Linkedin Share URL preview not showing correctly?
Asked Answered
B

3

11

I need to share dynamically created URLs in website to Facebook and LinkedIn. I am sharing to Facebook properly and all needed og tags have been set. But for LinkedIn, it is not working.

This is my URL: https://www.fourthambit.com/blogs_fa/102048

It is properly parsed in Facebook and preview is shown correctly.

But the same link is not working in LinkedIn.

Am I missing anything else?

All needed meta tags are set:

<meta property="og:title" content="Indian Media: Then.... Now... and Later" />
<meta content="Sensationalism has become synonymous with the Indian Media, especially Television. In 2008 dur..." name="description" />
<meta property="og:description" content="Sensationalism has become synonymous with the Indian Media, especially Television. In 2008 dur..." />
<meta content="Academic network" name="keywords" />
<meta property="og:image" content="https://www.fourthambit.com/article/getarticlephoto/big/ZGNlZQD4/0/102/20150807050217-12217198186.jpg" />
<img src="https://www.fourthambit.com/article/getarticlephoto/big/ZGNlZQD4/0/102/20150807050217-12217198186.jpg" style="display: none !important;" />
<meta property="og:type" content="website" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />

This is the ajax call going while I try to view a preview in LinkedIn update status bar text-area.

https://www.linkedin.com/sharing/api/url-preview?url=https://www.fourthambit.com/blogs_fa/102048

Buine answered 24/8, 2015 at 12:57 Comment(1)
I am experiencing the same problem with LinkedIn. But yours now seems to work! Did you find a solution that you can share??Nonfulfillment
K
15

The reason to this problem could be the following:

"Unfortunately LinkedIn caches the data it retrieves the first time the link is previewed and keeps it cached for a week!"

and the solution:

"The only way to “clear” the sharing preview cache for LinkedIn is to trick LinkedIn into thinking your page is a different (and new) page.

This is done by adding a made-up parameter to the link. It doesn’t affect your webpage, but it does force the metadata to be re-fetched.

Example:
Original link: http://beantin.se/consultant-resume
"New" link: http://beantin.se/consultant-resume?1

Katharinakatharine answered 5/6, 2017 at 6:33 Comment(1)
Perfect it works as expected.Straight
T
7

LinkedIn has launched Post Inspector. You can now do the following to clear LinkedIn Preview cache:

Step 1: Visit https://www.linkedin.com/post-inspector/inspect/

Step 2: Enter your url and click on Inspect, You will see the updated preview image

Step 3: Now try sharing your url on LinkedIn

Thistle answered 18/9, 2019 at 21:26 Comment(0)
M
1

It could be a caching issue, or it could be a misuse of the LinkedIn API.

If you think you have a caching problem, try...

  • Inspect your webpage at the LinkedIn Post Inspector.
  • Try sharing not just example.com, but, example.com/?someFake=Parameter. Since the URL is different, it shouldn't hit the cache.

So, if that's it, then why isn't og:description showing???

Because the LinkedIn API supports two levels:

  • Level 1: If you supplied an image, show image with title/domain.
  • Level 2: If you supplied a description, but no image, show description with title/domain.

Is it possible to display: title, image, description, url? No, it is not. I gleaned this over two weeks of struggling with the LinkedIn support team (oh the humanity).

Mineral answered 16/6, 2020 at 17:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.