Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook share does not close the window popup

Tags:

facebook

share

this is my code, as you can see it's very simple. there is an anchor that call a javascript method, and this opens a facebook popup shareing.

the problem is that the popup is not being closed after the user submit the comment.

<script language="javascript" type="text/javascript">
    function fbs_click() { 
    u = location.href; 
    t = document.title; 
    window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t) + '&redirect_uri=' + encodeURIComponent('http://www2.highpoint.edu/close_popup.php'), 'sharer', 'toolbar=0,status=0,width=656,height=436'); return false; }
</script>
<a id="share-facebook" class="shareLink" href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank">Facebook</a>

can you help me please?

like image 583
Ponja Avatar asked Jan 26 '26 12:01

Ponja


2 Answers

Was having the same problem, and came across the "feed dialog" - seems to have replaced the "sharer" functionality:

http://developers.facebook.com/docs/reference/dialogs/feed/

like image 166
Aidan Feldman Avatar answered Jan 29 '26 09:01

Aidan Feldman


Please do not use the deprecated sharer.php. It might be totally removed from Facebook at any moment.

You should use the like or send plugin in it's place: http://developers.facebook.com/docs/reference/plugins/like/

like image 33
DMCS Avatar answered Jan 29 '26 08:01

DMCS



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!