简单实用的获取微信公众号用户的信息
//微信认证部分:第二步 获得code
string code = Request["code"];
if (string.IsNullOrEmpty(code))
{
//如果code没获取成功,重新拉取一遍
OpenAccess();
}
//微信认证部分:第三步 获得openid
string url = string.Format("https://api.weixin.qq.com/sns/oauth2/access_token?appid={0}&secret={1}&code={2}&grant_type=authorization_code", appid, appsecret, code);
LogHelper.Debug(url);
string result = HttpClientHelper.GetResponse(url);
LogHelper.Debug(result);
本文地址:http://keair.bhha.com.cn/news/8537.html
康宝晨 http://keair.bhha.com.cn/ , 查看更多