title: Facebook like callback event using edge.create is not working
body: <p>So i've checked the internet to execute a code after a user liked a facebook page. </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Your Website Title&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="fb-root"&gt;&lt;/div&gt;
  &lt;script&gt;
  
      window.fbAsyncInit = function() {
          FB.init({
            appId            : '1517163758543318',
            autoLogAppEvents : true,
            xfbml            : true,
            version          : 'v3.1'
          });
  
  
          FB.Event.subscribe('edge.create', function(href, widget) {
              alert('You just liked the page!');
              console.log('You just liked the page!11111111111111');
          });
      };
  
  
  
      (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 = 'https://connect.facebook.net/en_GB/sdk.js#xfbml=1&amp;version=v3.1&amp;appId=380576395482732&amp;autoLogAppEvents=1';
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));
  
  &lt;/script&gt;
  
  &lt;div 
      class="fb-like" 
      data-href="https://www.facebook.com/When-you-dont-know-what-to-do-281837755939599/" 
      data-layout="standard" 
      data-action="like" 
      data-size="small" 
      data-show-faces="true" 
      data-share="false"&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Sometimes it alerts and sometimes it doesn't and i wonder what im doing wrong. Can someone point me to the right direction? Or give me some suggestion on doing this. </p>
  
  <p>some links i've checked <a href="https://stackoverflow.com/questions/2798622/facebook-like-button-callback">Facebook &quot;Like&quot; button callback</a>, <a href="https://stackoverflow.com/questions/6230092/facebook-like-button-callback-help">Facebook &quot;Like&quot; button callback help</a> , <a href="https://stackoverflow.com/questions/5558479/facebook-fb-event-subscribe-bug-with-the-edge-create-callback">Facebook FB.Event.subscribe &quot;bug&quot; with the edge.create callback</a> , <a href="https://stackoverflow.com/questions/5971113/cant-get-edge-create-callback-to-work-with-facebook-javascript-sdk">Can&#39;t get &#39;edge.create&#39; callback to work with facebook javascript SDK</a> , <a href="https://stackoverflow.com/questions/12026703/facebook-like-callback-function-not-working-in-opera">Facebook like callback function not working in opera</a> , <a href="https://stackoverflow.com/questions/6230092/facebook-like-button-callback-help">Facebook &quot;Like&quot; button callback help</a> , </p>