为什么FB.Event.subscribe触发? [英] Why is FB.Event.subscribe firing?

查看:86
本文介绍了为什么FB.Event.subscribe触发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我知道点击一个fb:login-button元素可以触发它,但FB.Event.subscribe事件正在点击Facebook会话创建时间。



当存在Facebook会话时,其他FBML元素会自动触发此事件,或者是否触发此事件,无论是否存在任何FBML元素?

解决方案

FB.Event.subscribe 本身不是一个事件,就像addListener一样将一个事件挂接到一个函数。您需要检查代码以查看您正在使用的事件:




  • auth.login - 当用户登录时触发

  • auth.logout - 当用户注销时触发

  • auth.sessionChange - 会话更改时触发

  • auth.statusChange - 状态更改时触发

  • xfbml.render - 调用FB.XFBML.parse()完成时触发

  • edge.create - 当用户喜欢某事时触发(fb:like)

  • edge.remove - 当用户不喜欢某事时触发(fb:like)

  • comments.create - 当用户添加注释时触发(fb:comments)

  • comments.remove - 当用户删除注释时触发(fb:comments)

  • fb.log - 在日志消息上触发



我想你有code> auth.sessionChange 事件


What causes the FB.Event.subscribe event to fire?

I know clicking an fb:login-button element can trigger it but the FB.Event.subscribe event is firing anytime a Facebook session is created.

Do other FBML elements automatically trigger this event when a Facebook session is present or does this event trigger regardless of regardless of any FBML elements present?

解决方案

FB.Event.subscribe by itself is not an event, it's just like the addListener where it hook an event to a function. You need to check your code to see what events you are using:

  • auth.login -- fired when the user logs in
  • auth.logout -- fired when the user logs out
  • auth.sessionChange -- fired when the session changes
  • auth.statusChange -- fired when the status changes
  • xfbml.render -- fired when a call to FB.XFBML.parse() completes
  • edge.create -- fired when the user likes something (fb:like)
  • edge.remove -- fired when the user unlikes something (fb:like)
  • comments.create -- fired when the user adds a comment (fb:comments)
  • comments.remove -- fired when the user removes a comment (fb:comments)
  • fb.log -- fired on log message

I suppose you have the auth.sessionChange event used.

这篇关于为什么FB.Event.subscribe触发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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