Facebook Javascript SDK - 一旦加载了 fb:likes 是否有回调函数?
我想知道一旦加载了 fb:like 按钮是否可以运行一些 javascript? 在上下文中:我想向 body 元素添加一个 .fbloaded
类,以更好地控制按钮的视觉加载。
我已经研究过 API 但无济于事。
感谢您抽出时间, 广告
I am wondering if it is possible to run some javascript once fb:like buttons have been loaded?
In context: I am wanting to add a .fbloaded
class to the body element to give greater control over the visual loading of the buttons.
I have ploughed through the API but to no avail.
Thanks for your time,
Ad
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够使用 FB.event.subscribe 触发回调。
http://developers.facebook.com/docs/reference/javascript/FB .Event.subscribe
还有一些正在运行的代码示例,此处有一个类似按钮:
http://www.saschakimmel.com/2010/05/how-to-capture-clicks-on-the-facebook-like-按钮/
希望有帮助!
You should be able to trigger a callback using FB.event.subscribe.
http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe
There are also a few examples of the code in action, with a like button here:
http://www.saschakimmel.com/2010/05/how-to-capture-clicks-on-the-facebook-like-button/
Hope that helps!