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

后端 未结 2 941
囚心锁ツ
囚心锁ツ 2021-02-04 12:25

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 butt

相关标签:
2条回答
  • 2021-02-04 12:42

    I think Facebook updated their documentation since I first looked :

    Now its clearer :

    http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe

    A 'like' click is the edge.create event

    0 讨论(0)
  • 2021-02-04 12:55

    Official FAQ:

    Q: How do I know when a user clicks a Like button?

    A: If you are using the XFBML version of the button, you can subscribe to the 'edge.create' event through FB.Event.subscribe.

    Source: Core Concepts › Social Plugins › Like Button

    0 讨论(0)
提交回复
热议问题