I'm using the following code to generate a Facebook share button:
<li>
<a
href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fsimplesharingbuttons.com%2F&t="
target="_blank"
title="Share on Facebook"
onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.URL)); return false;">
<i class="fa fa-facebook-square fa-2x"></i>
</a>
</li>
As you can see, I'm using window.open
, but the share dialogs opens in a new browser tab instead of a popup window.
How to modify this code to open the dialog in a popup window?