Implementation process:
url2, obtain user authorization code, the code will follow later in redirect_uri = url1, users sent to the business system, the business system to get the code, the user can get openid.
https://open.weixin.qq.com/connect/ oauth2 / authorize? appid = APPID & redirect_uri = rEDIRECT_URI & response_type = code & scope = sCOPE & state = STATE # wechat_redirect
URL3, get the code, the server sends a request to the micro-channel, and may acquire openId the access_token
https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code
After getting openId and access_token can obtain detailed information about the user
https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN
Reprinted: https://blog.csdn.net/u014225427/article/details/54926781