Esempio n. 1
0
        /// <summary>
        /// The initialize.
        /// </summary>
        /// <param name="accessToken"> The access token. </param>
        /// <param name="accessTokenSecret"> The access token secret. </param>
        /// <param name="username"> The username. </param>
        /// <param name="userId"> The user id. </param>
        public void Initialize(string accessToken, string accessTokenSecret, string username, long userId)
        {
            var con = new HttpOAuthApiProxy();

            if (_tk != accessToken || _tks != accessTokenSecret || _un != username)
            {
                // 以前の認証状態よりひとつでも変化があったらhttpヘッダより読み取ったカウントは初期化
                _tk  = accessToken;
                _tks = accessTokenSecret;
                _un  = username;
            }

            con.Initialize(ConsumerKey, ConsumerSecret, accessToken, accessTokenSecret, username, userId, "screen_name", "user_id");
            _httpCon      = con;
            _requestToken = string.Empty;
        }
Esempio n. 2
0
 /// <summary>
 /// The set twitter url.
 /// </summary>
 /// <param name="value"> url </param>
 public static void SetTwitterUrl(string value)
 {
     _twitterUrl = value;
     HttpOAuthApiProxy.SetProxyHost(value);
 }
Esempio n. 3
0
        /// <summary>
        /// The initialize.
        /// </summary>
        /// <param name="accessToken"> The access token. </param>
        /// <param name="accessTokenSecret"> The access token secret. </param>
        /// <param name="username"> The username. </param>
        /// <param name="userId"> The user id. </param>
        public void Initialize(string accessToken, string accessTokenSecret, string username, long userId)
        {
            var con = new HttpOAuthApiProxy();
            if (_tk != accessToken || _tks != accessTokenSecret || _un != username)
            {
                // 以前の認証状態よりひとつでも変化があったらhttpヘッダより読み取ったカウントは初期化
                _tk = accessToken;
                _tks = accessTokenSecret;
                _un = username;
            }

            con.Initialize(ConsumerKey, ConsumerSecret, accessToken, accessTokenSecret, username, userId, "screen_name", "user_id");
            _httpCon = con;
            _requestToken = string.Empty;
        }