Facebook actionscript api 注销在移动设备上不起作用
我有一个 adobe air 应用程序。我刚刚在其中添加了 Facebook 功能。
我的问题是用户可以正常登录并进行活动。
按照我用于注销的代码:
protected function logout(callback:Function=null, appOrigin:String=null):void { this.logoutCallback = 回调;
//clears cookie for mobile.
var params:Object = {};
params.confirm = 1;
params.next = appOrigin;
params.access_token = accessToken;
var req:FacebookRequest = new FacebookRequest();
openRequests[req] = handleLogout;
req.call("https://m.facebook.com/logout.php", "GET" , handleRequestLoad, params);
var so:SharedObject = SharedObject.getLocal(SO_NAME);
so.clear();
so.flush();
session = null;
}
我正在传递“https://www.facebook.com/”作为 appOrigin
但注销功能不起作用。
任何帮助表示赞赏。
I have an adobe air application. I just added facebook features in it.
My problem is that user can login and do activities properly.
Following the code that i am using for logout :
protected function logout(callback:Function=null, appOrigin:String=null):void {
this.logoutCallback = callback;
//clears cookie for mobile.
var params:Object = {};
params.confirm = 1;
params.next = appOrigin;
params.access_token = accessToken;
var req:FacebookRequest = new FacebookRequest();
openRequests[req] = handleLogout;
req.call("https://m.facebook.com/logout.php", "GET" , handleRequestLoad, params);
var so:SharedObject = SharedObject.getLocal(SO_NAME);
so.clear();
so.flush();
session = null;
}
i am passing "https://www.facebook.com/" as appOrigin
But the logout functionality is not working.
Any help appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
默认注销功能似乎无法通过 FacebookMobile actionscript API 正确清除 cookie。 这里的评论 #33 对我有用,在这里转载。确保添加您自己的 APP_ID:
The default logout functionality seems to not be properly clearing cookies via the FacebookMobile actionscript API. The solution in comment #33 here worked for me, reproduced here. Make sure to sub in your own APP_ID:
我为 iOS 移动应用程序做了类似的事情。我刚刚创建了一个字符串,类似于上一个答案中的字符串,并将回调添加到
FacebookMobile.logout()
。有趣的是,这似乎会让您退出应用程序,但访问令牌保持不变;至少在我测试它的短时间内,但它确实每次都会强制进行新的登录。
I did something similar for an iOS mobile app. I just made a string, akin to the one in the previous answer and added the callback to
FacebookMobile.logout()
.What's interesting is that this appears to log you out of the application, but the Access Token remains the same; at least for the short time I tested it, but it did force a new login each time nonetheless.