linkedin-apishare

Sharing a page to LinkedIn returns an error


We're having problems with sharing pages to LinkedIn using the URL scheme. Most all URL work fine, but one particular domain fails for every page under it. The response from:

https://www.linkedin.com/shareArticle/?url=https%3A%2F%2Fwww.robertsellsla.com%2Fcommercial-to-homes

is the immensely helpful "Something went wrong. Refresh the page". No errors in our logs, the page seems to be loading fine. No errors in the console. Per the requirements in LinkedIn, the page should be fine - we have the correct OG tags, the og:image is within their guidelines, but nothing.

Using the Post Inspector tells me that "The URL led to an empty page"m which it obviously does not. We have many other domains under our system, and they all work fine, but anything under this domain fails the same way. LinkedIn "help" has told me that, if I can't get a resolution from the Post Inspector, to try a different URL.

All suggestions (other than try a different URL) welcome.


Solution

  • Ok, thanks to sheng, I found the problem. Our application builds up a list of links, and hands them off to React. This particular account has a TON of them, and produces a huge page... over which LinkedIn then just throws it's hands up and barfs. So keep an eye on your page sizes when trying to share on LinkedIn.

    Too bad their "Post Inspector" wasn't better about diagnosing the problem, this could have been over much earlier.