I'm trying to use the 'edge.create' callback function of the Facebook javascript SDK to send an alert when a user clicks the like button on a page. Ultimately my goal is to have it regenerate styles on the page so that it can resize the facebook widget div dynamically when clicked. I cannot get the callback to work even for the alert though.
<html lang="en">
<head>
<title></title>
<script src="http://connect.facebook.net/en_US/all.js#appId=216985861663967&xfbml=1"></script>
<script>
FB.Event.subscribe('edge.create', function() {
alert('Liked');
});
</script>
</head>
<body>
<div id="fb-root"></div>
<fb:like send="false" layout="button_count" show_faces="false" font=""></fb:like>
</body>
</html>
Any ideas why this isn't working? When the button is clicked it gives the error:
Unsafe JavaScript attempt to access frame with URL
and later says Domains, protocols and ports must match.