出現這種錯誤網上查出現有的原因是:
-
訂閱號沒有相關的權限
-
賬號沒有認證,沒有相關的權限
那么這里遇到問題兩種都不是。開發賬號是 服務號,而且也是認證號。
解決方法:
錯誤配置:
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的位置不一樣!!!
當 scope 為 snsapi_base的時候沒有影響。但是scope為snsapi_userinfo 就會提示 scope參數錯誤或沒有scope權限 。