如何退出/注销微博Android上使用OAuth? [英] How to Sign Out / Log out of Twitter using Oauth on android?

查看:292
本文介绍了如何退出/注销微博Android上使用OAuth?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做一个Twitter的整合。

我不知道怎么登录Twitter的出来。

我用下面的code尝试注销...但它只是删除标记:

 尝试
        {
            共享preferences preFS = preferenceManager.getDefaultShared preferences(背景);
            最终的编辑器编辑= prefs.edit();
            edit.remove(OAuth.OAUTH_TOKEN);
            edit.remove(OAuth.OAUTH_TOKEN_SECRET);
            edit.commit();
        }
        赶上(例外五)
        {        }


解决方案

您没有退出兴奋极了。你只是从内部存储删除组oauth_token 键(共享preferences )。

I am doing a Twitter integration.

I do not know how to log out of Twitter.

I am using the following code to try logout... but it's just removing the tokens:

        try
        {
            SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
            final Editor edit = prefs.edit();
            edit.remove(OAuth.OAUTH_TOKEN);
            edit.remove(OAuth.OAUTH_TOKEN_SECRET);
            edit.commit();
        }
        catch(Exception e)
        {

        }

解决方案

You are not logging out of twitter. You are just removing the OAUTH_TOKEN keys from internal storage (Shared Preferences).

这篇关于如何退出/注销微博Android上使用OAuth?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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