Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am working for my client and there we have used LinkedIn share plugin (https://developer.linkedin.com/plugins/share) but we have been facing an issue with this plugin while using MS Internet Explorer. When the user clicks on the LinkedIn share plugin on IE, another popup window opens, this popup works fine over other browsers like Firefox, Chrome however on IE (with most users on IE11 and IE Edge), it shows an alert saying: "The webpage you are viewing is trying to close the window." If user clicks on "No" then it redirects to LinkedIn 404/Page not found (https://www.linkedin.com/404). We are looking for your help to investigate the issue to find the root cause and get it addressed.

Any help in fixing this issue will be greatly appreciated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
680 views
Welcome To Ask or Share your Answers For Others

1 Answer

The issue is that you're relying on the SDK and the plugin JS library for making and generating the button. That means all of LinkedIn's JS libs could be do any number of things to make the button appear and behave as it does. To have a URL-sharing link to Linkedin, all you really ought to need is...

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

Then you can just make any button, using any HTML, CSS, or JavaScript that you like, and hyperlink it to allow sharing of a page. Like so...

<a href="https://www.linkedin.com/sharing/share-offsite/?url={url}" target="_blank">Share on LinkedIn</a>

Source: Microsoft LinkedIn Share URL Documentation.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...