Example #1
0
        /// <summary>获取request token 重载
        /// 
        /// </summary>
        /// <param name="requesturl">The requesturl.</param>
        /// <param name="callback">The callback.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public bool GetRequestToken(string requesturl, string callback)
        {
            List<Parameter> parameters = new List<Parameter>();
            if (string.IsNullOrEmpty(callback))
            {
                this.callbackUrl = "http://www.qq.com";
            }
            else
                this.callbackUrl = callback;

             QWeiboRequest request = new QWeiboRequest();
             return ParseToken(request.SyncRequest(urlRequesToken, "GET", this, parameters, null));
        }
Example #2
0
        /// <summary>获取access token 重载
        /// Gets the access token.
        /// </summary>
        /// <param name="url">The URL.</param>
        /// <param name="verifier">The verifier.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public bool GetAccessToken(string url, string verifier)
        {
            List<Parameter> parameters = new List<Parameter>();
              this.verify = verifier;

              QWeiboRequest request = new QWeiboRequest();
            //很重要
              this.callbackUrl = null;
              return ParseToken(request.SyncRequest(url, "GET", this, parameters, null));;
        }