Showing posts with label Facebook “Like” button callback. Show all posts
Showing posts with label Facebook “Like” button callback. Show all posts

Thursday, February 24, 2011

FB.Event.subscribe is not working in IE

The code that I am using is this:

<script src="http://connect.facebook.net/en_GB/all.js#xfbml=1"></script>
<script>
$(document).ready(function(){
    FB.Event.subscribe('edge.create', function(response) {
        window.location= 'likeApp.php';
    });
});
</script>

The above code works fine in all browsers except IE.

After searching I came to know that we must add the fb-root element just after the body tag (Make sure this tag is right after your body tag):
<div id="fb-root"></div>

Hope this helps :)