我正在使用 cocoonjs 制作一个 HTML5 应用程序,当我单击登录按钮时尝试登录 facebook 时,它会在 safari 上打开 facebook 应用程序或 facebook 网站,之后如果我关闭 facebook 应用程序/safari,那么我的应用程序不会收到此通知登录失败
我如何检测到这个?
这是我的代码
if (this.socialService && !this.socialService.isLoggedIn()) {
this.socialService.login(function(session) {
self.log(session);
if (session.status !== "connected") {
console.log("not connected");
}
}, { scope: "publicprofile,user_friends" });
} else {
console.log("not connected");
}