事件处理以检测用户是否单击XFBML页面中的“赞"按钮 [英] Event handling to detect if user clicks a 'Like' button in XFBML page

查看:88
本文介绍了事件处理以检测用户是否单击XFBML页面中的“赞"按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Facebook Connect应用程序/canvas IFrame应用程序,该应用程序具有用于扇页的Like控件.

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

我想检测用户何时单击Like按钮以显示其他信息(优惠券代码).

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

我正在使用最新的 JavaScript API ,但事件似乎不包括对社交小部件控件的检测. Like Plugin 的文档未显示任何事件.

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.

但是我知道它绝对有可能,因为如果我在页面上有两个Like按钮,那么无论我喜欢还是不喜欢它们,它们都会立即彼此更新.

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.

修改:专门允许要求某人成为促销迷:

It is specifically allowed to require someone to become a fan for a promotion :

4.2在促销规则中,否则,您将不 参加任何促销活动即可进入促销活动 例如,在Facebook上执行操作, 更新状态,发布到 个人资料或信息页,或上传照片.

4.2 In the rules of the promotion, or otherwise, you will not condition entry to the promotion upon taking any action on Facebook, for example, updating a status, posting on a profile or Page, or uploading a photo.

但是,您可以限制输入 晋升 成为粉丝 页面.

You may, however, condition entry to the promotion upon becoming a fan of a Page.

推荐答案

我认为自从我第一次看以来,Facebook就更新了他们的文档:

I think Facebook updated their documentation since I first looked :

现在更加清晰:

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

点击喜欢"是edge.create事件

这篇关于事件处理以检测用户是否单击XFBML页面中的“赞"按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆