예제 #1
0
파일: WxService.cs 프로젝트: sud423/Csp
        public async Task <WxUser> GetSnsApiUserInfo(string code)
        {
            var token = await AccessTokenFactory.GetTokenAsync(code);

            if (token == null)
            {
                return(null);
            }

            string url = $"{WxConstants.SNSAPI_USERINFO_URL}?access_token={token.AccessToken}&openid={token.OpenId}&lang=zh_CN";

            return(await WxClient.GetAsync <WxUser>(url));
        }