微信公众号获取openId流程

liu38626gang_work 28 0 PDF 2021-01-16 01:01:22

1、从微信后台获取code:用户请求微信后台,带上appid等参数 “https://open.weixin.qq.com/connect/oauth2/authorize?appid=” + appId + “&redirect_uri=” + redirectUri + “&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect”; 2、上一步请求成功后,微信会回调 redirectUri 地址,并在参数后带上code和state: redirect_uri/?code=CODE&state=STATE。 3、后台根

用户评论
请输入评论内容
评分:
暂无评论