网站之前使用公众号AppId绑定网站,来实现微信浏览器打开点击微信登录时自动授权。
现在要把公众号改换成开放平台的网站应用,已经替换了Appid为网站应用并且网站应用的回调网址也改成了此网站。
登录权限也获取了。
为什么点击微信登录时报错Scope 参数错误或没有 Scope 权限。
https://open.weixin.qq.com/connect/oauth2/authorize?appid=$this->appId&redirect_uri=" . $redirect_uri . "&response_type=code&scope=snsapi_userinfo&state=xxxx#wechat_redirect
上述为原url scope改成snsapi_login也还是报错。
网站应用是扫码登录,用的链接是:https://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
参考下这个文档:https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx047c912586a2da54&redirect_uri=https%3A%2F%2Fsxbh5.zfire.top%2FpackageGoods%2Fpages%2Fdetail%3Fid%3D176240419680269516911455415765839953922%26openId%3D%26userId%3D%26mobile%3D%26username%3D%26useravatar%3D%26appId%3Dwx047c912586a2da54&response_type=code&scope=snsapi_userinfo&uin=MTU0NDU1MDY2Mg%3D%3D&key=097b1e759e5c01c8502d293ec4d16ebc4e9a0e980fdf983f5dec95f6214b4fa7b326055f5cc1ef3d0aaa71a22765b176&pass_ticket=R70CX5V/uFnh5aUl9TNCs8eQtpo50SwgA/dISR0D7R7ooRoaV9RVRs2IqJf+teFQc2upGT1i7VxmjcB7i2FI/m3iZDJaIM9jDIMpr89fBCQ=
同问