use of com.googlecode.flickrjandroid.oauth.OAuthToken in project glimmr by brk3.
the class LoginFragment method persistAccessToken.
private void persistAccessToken(OAuth oauth) {
SharedPreferences sp = mActivity.getSharedPreferences(Constants.PREFS_NAME, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
OAuthToken token = oauth.getToken();
User user = oauth.getUser();
editor.putString(Constants.KEY_OAUTH_TOKEN, token.getOauthToken());
editor.putString(Constants.KEY_TOKEN_SECRET, token.getOauthTokenSecret());
editor.putString(Constants.KEY_ACCOUNT_USER_NAME, user.getUsername());
editor.putString(Constants.KEY_ACCOUNT_USER_ID, user.getId());
editor.commit();
}
Aggregations