Event handling to detect if user clicks a 'Like' button in XFBML page

Posted by Simon_Weaver on Stack Overflow See other posts from Stack Overflow or by Simon_Weaver
Published on 2010-05-14T22:18:38Z Indexed on 2010/05/14 22:24 UTC
Read the original article Hit count: 272

Filed under:
|
|

I have a Facebook connect app / canvas IFrame app which has a Like control for a fanpage.

I'd like to detect when the user clicks the Like button to be able to display additional info (a discount coupon code).

I'm using the latest Javascript API but the events that can be handled doesn't seem to include detection of social widget controls. The documentation for the Like Plugin doesn't show any events.

However I know its definitely possible because if I have two Like buttons on a page they both instantly update each other if I like or unlike whatever it is.

© Stack Overflow or respective owner

Related posts about facebook

Related posts about xfbml