我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

检测Facebook App Canvas已卸载

I need to detect that a user unloads my Facebook app (navigates to somewhere else or logs out of Facebook). How can this be done? I have tried:

FB.Event.subscribe('auth.logout', function(response) {
    console.log('logged out');    
});

But this never fires :(

why not try to listen to the window unload event rather than using the Facebook API:

window.addEventListener('unload', function(event) {
   console.log('Bye bye!');
});

This should catch the situations you need

近期文章

  • jQuery slideToggle()不起作用
  • 使用PHP提取特定的字符串数据
  • PHP DOM DOCUMENT无法加载文件
  • 页面重新加载并发送给自己的帖子
  • 在onClick中使用PHP变量[关闭]
  • PHP:write_socket()发出意外警告
  • $ SERVER变量和double localhost
  • 通过PHP链接SSH命令
  • 从mysql数据库的单个“单元”中的大量数据中提取特定数据
  • 将页面上的所有链接重新路由到localhost
  • Godaddy Ubuntu 3.6 mod_rewrite问题
  • 倒计时7小时然后显示确定
  • 语法错误:MySQL插入选择
  • 从网址中删除文件扩展名
  • RewriteEngine隐藏扩展和GET
  • 需要php配置类,但找不到文件
  • Symfony2如何访问所有控制器中的一组数据?
  • 为什么不显示结果呢?
  • 关于ssm项目中css样式,js文件失效的问题
  • R语言字符串处理问题:"\n AB\n / CD E/ FGH\n "怎么用stringr函数截取数据集中的AB啊(注:ABCD等均为字符串)

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华