views:

280

answers:

1

I've put facebook like buttons into my wordpress blog... the idea is to use them as kind of a voting mechanism for posts. What I would like to do is automatically add a comment for the blog post everytime someone 'likes' it via the facebook like button.

So my question is- does the like button api provide some kind of a callback to my page if someone 'successfully' likes something? - ie. they have not already liked it before, and they get through the process of submitting it to facebook successfully.

Thanks for any help. Fyi I am very new to the facebook api

-rich

+1  A: 

You need to subscribe to edge.create event according to docs:

FB.Event.subscribe('edge.create', function(href, widget) {
   alert('You just liked '+href);
});

but for some reason I couldn't make it work last time I tried...

serg