Пример #1
0
        public static bool restore(Twitter session)
        {
            String accessToken = "";
            String secretToken = "";

            if (settings.Contains(ACCESS_TOKEN) && settings.Contains(SECRET_TOKEN))
            {
                accessToken = settings[ACCESS_TOKEN].ToString();
                secretToken = settings[SECRET_TOKEN].ToString();
            }

            session.setAccessToken(accessToken);
            session.setSecretToken(secretToken);

            return(session.isSessionValid());
        }
Пример #2
0
 internal static void clearTwitterSession(Action <Boolean, Exception> callback)
 {
     if (twitter != null && twitter.isSessionValid())
     {
         twitter.setAccessToken(null);
         twitter.setSecretToken(null);
         TwitterSession.clear();
         clearTwitterCookies(callback);
     }
     else
     {
         if (callback != null)
         {
             callback(true, null);
         }
     }
 }