LinkedIn Share button doesn't work in Microsoft Edge

674 Views Asked by At

My website has a LinkedIn Share button at the top. This seems to be working fine in Chrome, Firefox, & IE. With Edge, however, we get this ugly error message:

linkedin error message

I used the Share Plugin Generator on LinkedIn's developer portal which generated this script:

<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<script type="IN/Share" data-url="https://www.aoccorp.com"></script>

Why is this not working in Edge while it works in the other browsers?

Thanks, Steve

Update: Interestingly, I experience the same behavior in LinkedIn's own developer blog (https://developer.linkedin.com/blog/posts/2018/deprecating-the-inshare-counter).

2

There are 2 best solutions below

3
On BEST ANSWER

Thank you for raising this issue! There is a known compatibility issue with LinkedIn plugins and Microsoft Edge. While our teams are currently working on a solution, you will continue to see these types of errors with Microsoft Edge.

0
On

Solution: Do NOT use the LinkedIn Share Library.

Take a look: Here's someone else posting in 2018 having the same exact problem, Issue on IE with LinkedIn Share plugin. And here's another person: Error on clicking the LinkedIn Share Button on IE/Edge in 2019. And, officially from LinkedIn, if you want this plugin to work, you need to ask your users to do this:

  1. Open Internet Explorer.
  2. Click Tools and select Compatibility View Settings.
  3. Uncheck the box next to "Display all websites in compatibility view".
  4. Click Close.

Is it reasonable to ask your users to reconfigure their browser just to be able to click one, single button on your website? Answer: No.

You don't need to rely on the LinkedIn Share Plugin. All you really ought to need is...

https://www.linkedin.com/sharing/share-offsite/?url={url}

Then making sure it works cross-browser is in your hands.

Source: Microsoft LinkedIn Share URL Documentation.

Sure, everyone says: Don't Reinvent the Wheel! I totally agree! But when you find a car that has square, cubic wheels, then maybe you want to reconsider!

If you are interested in a regularly maintained GitHub project that keeps track of this so you don't have to, check it out! Social Share URLs

Social Share URLs Image