title: Getting total count of FB Likes for a web-app page using Rails
body: <p>I am building a rails app where there is an image gallery and users will be able to hit the facebook like button for each image they open. Each image can have its seperate page URL. I plan to use the facebook like plugin so that users can like the photos as web-pages. So far I was able to find that if I do <code>https://graph.facebook.com/?id=http://www.mysite.com/ImagePage</code> i get:</p>
  
  <pre><code>{
     "id": "http://www.mysite.com/ImagePage",
     "shares": 30
  }
  </code></pre>
  
  <p>This leaves me with 2 problems.</p>
  
  <ol>
  <li><p>The <code>shares</code> property is not exactly the total count of likes, it is only the count of times the link made it to the user's facebook wall. How do I get the number of likes?</p></li>
  <li><p>Is there an eventHandler or something I can use to know when a user clicks Like? so that I can store that information? I want to store the likes count at my end so that I can show the gallery in the order of descending number of total likes in each day. </p></li>
  </ol>
  
  <p>I have come across the rails Koala gem but I am not sure if I need to use that for my application yet, as I do not have the need to log in users using facebook login/connect. Please advise if you think I need to do so to do what I mentioned above.</p>