LinkedIn share ignoring OG tags
Asked Answered
E

1

6

For some reason LinkedIn won't apply open graph tags. I've tested the OG tags with the Facebook debugger and there were no problems. Here is a link to the page which is serving the OG tags: http://jakonazivo.cz/share/1 . You will have to view a source of this file as its purpose is just to serve the OG tags and then to redirect to the news page on the website.

Any ideas what could be causing this issue with LinkedIn?

Episternum answered 25/3, 2013 at 16:49 Comment(2)
where you able to figure out a fix on this?Iapetus
Same problem here in 2014. I do find it interesting StackOverflow has shares for FB, Twitter, and G+, and NOT for LinkedIn.Plainsong
L
0

There are a few things I can suggest...

You Cannot Use Both Image and Description

As I have stated elsewhere, you cannot use both the image and the description. If you try to use both, only the image will display. Source: Two Week Argument With LinkedIn Developers.

You Should Invalidate LinkedIn Cache

If you're ever unable to figured out why LinkedIn isn't parsing generating the expected preview in its sharing app, then try the LinkedIn Post Inspector. Merely checking my site, then rechecking again a second later, will cause the cache to invalidated after the first attempt, and the new, cached version to be there in the second attempt.

If the LinkedIn Post Inspector is no help, the developers at OpenGraph were wise enough to create the same thing, an OpenGraph Tag Inspector.

If you still think it's the cache, try sharing not example.com, but, example.com/?someFake=Parameter. A different URL will mean a cache miss.

You Should Use OGTags

Finally, be aware that you can only share the following, according to the Official Microsoft LinkedIn Documentation...

  • <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" />

And be aware: Using og:image means LinkedIn will ignore your og:description tag. You can confirm this yourself by testing with Wikipedia.org (no og:image but an og:description) and GitHub.com (both og:image and og:description tags).

Limes answered 16/6, 2020 at 18:24 Comment(2)
Does that mean, I can't share both image and description on Linkedin? That doesn't sound correct as I have seen such post shared. Am i missing something here?Thorianite
@SaurabhTiwari Hey hey, that would be correct! I'm updating my post with a bit of cleanup. But yeah, you can't use Description AND Image at the same time. That doesn't have to do with OP's question, but it does have to do with this other Q I answered: How to Get Description Field to Display with LinkedIn Share API.Limes

© 2022 - 2024 — McMap. All rights reserved.