Search code examples
javascriptfacebookinternet-explorerfacebook-sharer

Facebook Share Button Not Rendering in IE


I have the following code for a facebook Share button* on my page.

            <a name="fb_share" share_url="<?php echo $url;?>"></a> 
            <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" 
                    type="text/javascript">
            </script>

In Chrome and Firefox, the above script renders an iframe with the share button. However in IE, the above script sits there and doesn't do anything.

Anyone have any ideas as to why? Thanks

*(for my particular application, share is more suitable than 'Like' and 'Send')


Solution

  • The share button is deprecated. I recomend you to do this:

    <a href="//www.facebook.com/sharer/sharer.php?u=<?php echo urlencode(YOUR_URL);?>" target="_blank">
        <img alt="Share" src="URL_OF_ANY_IMAGE">
    </a>