phpwordpressfacebook-opengraphlinkedin-api

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?


Solution

  • I checked again my html and found some warnings/errors in metadata. I fixed them and all work good. So the solution if you encounter the same problem:

    Check your html again and debug it. Even if the page load well in your browser, the LinkedIn parser is not as powerful in terms of small errors. This tool might help.