title: How to check if user has shared website on Facebook
body: <p>This is what I did but nothing happens when the I click on the share on facebook link:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" lang="en"&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Facebook share&lt;/title&gt;
   &lt;/head&gt;
  &lt;body&gt; 
  &lt;script src="http://connect.facebook.net/en_US/sdk.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
      &lt;script&gt;
      window.fbAsyncInit = function() {
    FB.init({
      appId      : '1407416289470597',
      xfbml      : true,
      version    : 'v2.0'
    });
  };
  
  
        (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/sdk.js";
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));
  
  function test() 
  {    
      FB.ui(
        {
          method: 'share',
          href: 'https://www.mywebsite.com',
        },
        function(response) {
          if (response &amp;&amp; !response.error_code) {
            alert('Posting completed.');
          } else {
            alert('Error while posting.');
          }
        }
      );
  }
  
  &lt;/script&gt;
  
  &lt;a href="" onClick="test()"&gt;Share&lt;/a&gt;
  
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>Any ideas? Nothing happens when I click on the Share link.</p>
  
  <p>I don't know what's wrong. I copy-pasted <a href="http://www.writeyourcode.com/share-with-facebook-feed-dialog-2/" rel="nofollow">this</a> example as well, still nothing.</p>
  
  <p>Tested it on a VPS with SSL and on a shared server as well.</p>