title: Where to Place FB.Event.subscribe
body: <p>Below is the code I'm using on my site for the Facebook Like button (and  the Share button).</p>
  
  <p>It works great.  I click the Like button, and boom, there's a nice notification in my Facebook account's profile page.  Facebook even auto-generates a preview image that happens to be the logo of my site.  Wonderful.  The Like counter on my site totals up correctly. </p>
  
  <p>So I want to record clicks on the Like button.  According to <a href="http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/" rel="nofollow">this</a> page, the code <code>FB.Event.subscribe('edge.create', function(response) {});</code> allows you to do this.</p>
  
  <p>Where exactly in the code below should I put the code <code>FB.Event.subscribe('edge.create', function(response) {});</code>?</p>
  
  <pre><code>    &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"&gt;
  
      &lt;?php
  
      echo '&lt;div id="fb-root"&gt;&lt;/div&gt;';
  
      echo "&lt;script type='text/javascript'&gt;
        window.fbAsyncInit = function() {
          FB.init({appId: 'my_fb_app_id', status: true, cookie: true,
                   xfbml: true});
        };
  
  
        (function() {
          var e = document.createElement('script'); e.async = true;
          e.src = document.location.protocol +
            '//connect.facebook.net/en_US/all.js';
          document.getElementById('fb-root').appendChild(e);
        }());
  
  
  
      });
  
      &lt;/script&gt;";
  
  
      echo '&lt;script src="http://connect.facebook.net/en_US/all.js#xfbml=1"&gt;&lt;/script&gt;&lt;fb:like href="" send="true" layout="button_count" width="450" show_faces="false" font="arial"&gt;&lt;/fb:like&gt;'; 
  
  ?&gt;
  </code></pre>