错误原因是:
1. 订阅号没有相关的权限
2. 账号没有认证,没有相关的权限
3. scope 参数位置错误
错误配置:
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf0e81c3bee622d60&redirect_uri=http%3A%2F%2Fnba.bluewebgame.com%2Foauth_response.php&scope=snsapi_userinfo&response_type=code&state=STATE#wechat_redirect
正确的配置:
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf0e81c3bee622d60&redirect_uri=http%3A%2F%2Fnba.bluewebgame.com%2Foauth_response.php&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect
原因就是 scope 的位置不一样
如果BeanB没有写:scope=\"prototype\" ... 那么会出异常并提示你说: No Scope registered for scope \'Prototype\' 如果你添加scope=\'Prototype\'....还是这个错. 那么看看你的”prototype“字符的大小写问题,java是区分大小写的。
希望能解决您的问题。
同问 有没有解决了?我的问题跟你一模一样