/// <summary>
 ///  Oauth 2.0 默认使用缓存值
 /// </summary>
 /// <returns></returns>
 public static oAuthSina oAuth()
 {
     Wbm.SinaV2API.SinaBase.RegisterKey("app_1");
     SinaCache cache = new SinaCache(Application.AppName);
     return oAuth(cache.AccessToken);
 }
 /// <summary>
 /// 更新缓存值
 /// </summary>
 /// <param name="accessToken">通过Authorization Code获取的Access Token</param>
 /// <param name="openId">用户的ID,与QQ号码一一对应。</param>
 public static void UpdateCache(string accessToken)
 {
     SinaCache cache = new SinaCache(Application.AppName);
     cache.AccessToken = accessToken;
 }
 /// <summary>
 /// 清除缓存值
 /// </summary>
 public static void ClearCache()
 {
     SinaCache cache = new SinaCache(Application.AppName);
     cache.AccessToken = null;
 }
Exemple #4
0
        /// <summary>
        ///  Oauth 2.0 默认使用缓存值
        /// </summary>
        /// <returns></returns>
        public static oAuthSina oAuth()
        {
            SinaCache cache = new SinaCache(Application.AppName);

            return oAuth(cache.AccessToken);
        }