Topic: facebook like button updating my internal like
I am implementing a facebook like button on my rails 3.1 app but would like to keep track of the amount of facebook likes. This is helpful for me as it will allow me to sort my images by the most facebook likes. I am using the simpler way of iframe and facebook like plugin. My code for my helper is
def facebook_like
content_tag :iframe, nil, :src => "http://www.facebook.com/plugins/like.php?href=#{CGI::escape(request.url)}&layout=standard&show_faces=true&width=450&action=like&font=arial&colorscheme=light&height=80", :scrolling => 'no', :frameborder => '0', :allowtransparency => true, :id => :facebook_like
endFor my model, I have a personalize like attribute. What would be the best way to increase the like attribute whenever someone click on the facebook like.
I also know that facebook has a graph.facebook.com that will tell me how many shares there are for that object. Will that be relevant in updating my own internal like?