title: Facebook callback for Dummies
body: <p>After the Facebook Like button has been pressed, "You just liked the page" should be alerted.</p>
  
  <p>Ive been sitting over this problem over the last 2 nights and I read everything I could find but still have no clue how to do it. Some people say you need an developers account, some say you don't and all in all Im even more confused right now than I was before. </p>
  
  <p>I am so greatful if anyone of you could be the first one to write simple comprehendible instructions on how to solve that problem, a "Facebook callback for Dummies".</p>
  
  <p>PS: I can only use HTML and javascript!</p>
  
  <p>PPS: If you know how to do it with Twitter and Google+, that's good too!</p>
  
  <p>That's what I found on the facebook page:
  Page Likes
  edge.create</p>
  
  <p>edge.create is fired when someone clicks a like button on your page to like something.
  edge.remove</p>
  
  <p>edge.remove is fired when someone clicks a like button on your page to unlike something.
  Callback</p>
  
  <p>The callback for both of these events will be called with two arguments:
  Name    Type    Description</p>
  
  <p>href</p>
  
  <p>string</p>
  
  <p>URL of the like target.</p>
  
  <p>widget</p>
  
  <p>object</p>
  
  <p>Document element for the button that was pressed.
  Example</p>
  
  <p>Here's an example of a callback that can handle either the edge.create or edge.remove event:</p>
  
  <pre><code>var page_like_or_unlike_callback = function(url, html_element) {
    console.log("page_like_or_unlike_callback");
    console.log(url);
    console.log(html_element);
  }
  
  // In your onload handler
  FB.Event.subscribe('edge.create', page_like_or_unlike_callback);
  FB.Event.subscribe('edge.remove', page_like_or_unlike_callback);
  </code></pre>