3

I have searched all over the internet for an answer and although I can find a million people with the same question I cannot find an official solution to the problem im experiencing.

I always get "Cannot display preview. You can post as is, or try another link." displayed.

I've stripped a page down to only the required open graph meta tags so I know they work (run through multiple OG validators), Ive disabled any kind of robots blocking, any kind of redirects, disabled the firewall on a test server, made sure the LinkedIn bot requests are hitting the server. All I see in the browser console all the time is a status 500 being returned from LinkedIn's preview generator API.

We are hosting on Windows Server in IIS 8.5, it seems if I create a demo and host it somewhere else it works, which makes me think it is server related or IIS settings.

Reading this Linkedin post's picture doesn't appear in summary its seems like a similar issue. We are not serving over SSL so nothing to do with that.

I have already asked this question on LinkedIn's forum but having no luck, so im hoping someone on here can help or someone from LinkedIn's tech team can help.

Thanks

Phil Jenkins
  • 161
  • 2
  • 15

1 Answers1

2

So we had this issue as well and it turns out parts of our system that use user generated themes were not adding the "Content-Type" header to the response.

So examine the response headers coming from your server and make absolutely sure they are correct and that they include the correct "Content-Type" (with correct encoding) and "Content-Length".

Adam Gent
  • 47,843
  • 23
  • 153
  • 203
  • You are a life saver. Ive marked it as answered as it lead me to the solution. Based on the Content-Length response, I could see there was a difference between a normal browser request compared to the Linkedin bot. It turned out for some reason in our theming system the Linkedin bot was only receiving partial views rather than the full page with the _Layout included. – Phil Jenkins Oct 25 '18 at 13:35