微信授权获取用户信息

1.首先通过后台获取想过公众好的appId

2.通过appId跳转

https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect 

页面通过配置redirect_uri后跳转返回,此时链接中已携带code/openid,此时通过后台换取token,获取关联信息

原文地址:https://www.cnblogs.com/longsiyuan/p/12464057.html