I am developing a rails 3 app that needs to have to a facebook "like" button and display the profile pictures of the people who have click it and complete the liking process (logging into facebook, etc). For other reasons, my app needs to know when the @current_user
has successfully liked my site. For instance, if they click the button but they aren't logged in to facebook and never bother to log in to facebook to complete the process, my app should not think that they liked my site. What's the easiest way to do this? I'd appreciate any help.
Asked
Active
Viewed 830 times
4
-
Is there a way to check people who like you through the Facebook API? – Drew Jan 03 '11 at 20:09
1 Answers
5
Attach to the Facebook javascript event using FB.Event.subscribe
FB.Event.subscribe('edge.create', function(response) {
// fire an ajax call to store that the user has liked you
});
edge.create -- fired when the user likes something (fb:like)
http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe

Jesse Wolgamott
- 40,197
- 4
- 83
- 109