在网页视图清除用户的Facebook会话 [英] Clearing user's Facebook session in Webview

查看:103
本文介绍了在网页视图清除用户的Facebook会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页视图,它允许用户分享图片到Facebook。这个过程涉及到他们登录到FB。他们完成后,我摧毁的WebView和应用程序重置和不同的用户提供相同的功能。其目的是为web视图不留从一个会话登录到下一个,但是,我对如何手动注销用户在他们的会议结束不清(调用的http://www.facebook.com/logout.php 不再起作用,显然),并抢得的WebView的新实例和WebChromeClient没有做,要么

I have a WebView which allows a user to share an image to facebook. This process involves them logging into FB. After they're done I destroy the WebView and the app resets and a different user is offered the same functionality. The intention is for the WebView to not to remain logged in from one session to the next, however, I'm unclear on how to either manually log the user out at the end of their session (calling http://www.facebook.com/logout.php no longer works, apparently), and grabbing new instances of WebView and WebChromeClient doesn't do it either.

不过,我注意到,当我重新安装应用程序(如我修改)在日志中被清除,所以,我假设*莫名其妙的Webkit可以告诉大家,这是一个不同的应用程序(因为它已被卸载和重新-installed),我希望我可以利用这个(或任何其他)机制以清除不管它是保存用户的登录信息...我猜这是一个cookie,但我不能完全肯定这是。

However, I notice that when I reinstall the application (as I modify it) the log in is cleared, so, I'm assuming that *somehow Webkit can tell that this is a different app (as it is uninstalled and re-installed) and I'm hoping I can leverage this (or any other) mechanism to clear whatever it is that holds the user's login info... I'm guessing it's a cookie, but I'm not entirely certain that it is.

我敢肯定,我不是需要手动,但不是通过我自己的OAuth登录用户FB出来的(因为我不是一个登录他们)的第一人。

I'm sure I'm not the first person to need to log the user out of FB manually, but not via my own oAuth (since I'm not the one logging them in).

推荐答案

pretty确保它通过设置cookie。尝试:

Pretty sure it's set by cookie. Try:

android.webkit.CookieManager.getInstance().removeAllCookie();

这篇关于在网页视图清除用户的Facebook会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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