public TwitterOAuthMessageHandler(OAuthCredential oAuthCredential, OAuthSignatureEntity signatureEntity,
            TwitterQueryCollection parameters, HttpMessageHandler innerHandler)
            : base(innerHandler)
        {
            //TODO: Parameters needs to come here as encoded so that they can be encoded twice
            //      for the signature base. Handle that.

            //TODO: We don't even need to get parameters seperately. We can get them through
            //      query string and by reading the body but reading the body is a overhead here.

            _oAuthState = new OAuthState() {
                Credential = new OAuthCredentialState() {
                    ConsumerKey = oAuthCredential.ConsumerKey,
                    //encode it here first
                    CallbackUrl = OAuthUtil.PercentEncode(oAuthCredential.CallbackUrl),
                    Token = oAuthCredential.Token
                },
                SignatureEntity = new OAuthSignatureEntityState() {
                    ConsumerSecret = signatureEntity.ConsumerSecret,
                    TokenSecret = signatureEntity.TokenSecret
                },
                Parameters = parameters,
                Nonce = GenerateNonce(),
                SignatureMethod = GetOAuthSignatureMethod(),
                Timestamp = GenerateTimestamp(),
                Version = GetVersion()
            };
        }
        public TwitterHttpClient(OAuthCredential oAuthCredential, OAuthSignatureEntity oAuthSignatureEntity,
            TwitterQueryCollection queryCollection)
            : base(new TwitterOAuthMessageHandler(oAuthCredential, oAuthSignatureEntity, queryCollection, new HttpClientHandler()))
        {
            if (oAuthCredential == null) {
                throw new NullReferenceException("oAuthCredential");
            }

            if (oAuthSignatureEntity == null) {
                throw new NullReferenceException("signatureEntity");
            }

            _oAuthCredential = oAuthCredential;
            _twitterQueryCollection = queryCollection;
            _oAuthSignatureEntity = oAuthSignatureEntity;
        }
 public TwitterConnector()
 {
     _creds = new OAuthCredential(consumerKey) { Token = token };
     _signatureEntity = new OAuthSignatureEntity(consumerSecret) { TokenSecret = tokenSecret };
 }
 public TwitterHttpClient(OAuthCredential oAuthCredential, OAuthSignatureEntity oAuthSignatureEntity)
     : this(oAuthCredential, oAuthSignatureEntity, null)
 {
 }