Ejemplo n.º 1
0
        /// <summary>
        /// 验证当前登录用户
        /// </summary>
        /// <returns></returns>
        public WeiboUser VerifyCredentials()
        {
            var request = new SinaVerifyCredentialsRequest();
            var user = _weiboClient.Get(request).User;

            var weiboUser = new WeiboUser
            {
                Id = user.Id.ToString(),
                UserName = user.Name,
                NickName = user.ScreenName
            };

            return weiboUser;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 验证当前登录用户
        /// </summary>
        /// <returns></returns>
        public WeiboUser VerifyCredentials()
        {
            var request = new QQUserInfoRequest();
            var user = _weiboClient.Get(request).User;

            var weiboUser = new WeiboUser
            {
                Id = user.Uid,
                UserName = user.Name,
                NickName = user.Nick
            };

            return weiboUser;
        }