I am trying to redirect the url if the Facebook Like button is clicked, but it does not work, and the results have an error in the original view, which says: "FB is not defined"
Here is my redirect code:
FB.Event.subscribe('edge.create', function(response) { location.href = 'censored'; } );
and here the FB button is like a button
<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <center><fb:like href="http://www.siriforall.net" send="true" width="450" show_faces="false"></fb:like></center>
Can anybody help? I'm sorry, I'm sorry.
source share