Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linkedin sharing urls / not parsing open graph

The Linkedin documentation can be found here

As it says, it needs:

og:title
og:description
og:image
og:url

Here is an example of my wordpress blog source code that for simplicity I use Jetpack plug-in:

<!-- Jetpack Open Graph Tags -->
<meta property="og:type" content="article" />
<meta property="og:title" content="Starbucks Netherlands Intel" />
<meta property="og:url" content="http://lorentzos.com/starbucks-netherlands-intel/" />
<meta property="og:description" content="Today I had some free time at work. I wanted to play more with Foursquare APIs. So the question: &quot;What is the correlation of the Starbucks Chain in the Netherlands?&quot;. Methodology: I found all the p..." />
<meta property="og:site_name" content="Dionysis Lorentzos" />
<meta property="og:image" content="http://lorentzos.com/wp-content/uploads/2013/08/starbucks-intel-nl-238x300.png" />

In Facebook it works great, or you can see the meta data here. However LinkedIn is more stubborn and doesn't really parse the data even the If you're unable to set Open Graph tags within the page that's being shared, LinkedIn will attempt to fetch the content automatically by determining the title, description, thumbnail image, etc.

I know that I don't have the og:image:width tag but Linkedin doesn't even parse title, description or url. Any ideas to debug it?

like image 234
Diolor Avatar asked Aug 27 '13 14:08

Diolor


1 Answers

I stumbled about the same problem for our Wordpress site. The problem is created by conflicting OGP and oembed headers in standard wordpress + yoast / jetpack seo plugin.

You need to disabled the oembed headers with this plugin (this has no side effects): https://wordpress.org/plugins/disable-embeds/

After that you can force a fresh link preview by appending a ?1 as some of you guys already pointed out!

I hope that fixes your problem.

I wrote a detailed explanation for the problem here: https://pmig.at/2017/10/26/linkedin-link-preview-for-wordpress/

like image 147
Philip Avatar answered Oct 16 '22 05:10

Philip