python - 微信登录授权
PHP中文网
PHP中文网 2017-04-17 17:44:46
0
2
340


手机端微信打开就是这样

以下是控制台的信息,我打印了请求url

Starting development server at http://127.0.0.1:80/
Quit the server with CTRL-BREAK.
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx478762de33427c1d&redirect_uri=http://zhang.tunnel.qydev.com/oauth/&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect
[02/May/2016 20:48:15] "GET /oauth/ HTTP/1.1" 302 0


我用ngrok转发的,微信signature验证是没问题的
请问这里哪里出了问题,请求指点

下面是后台函数    

def get_connect_url(self,
                redirect_url,
                scope="snsapi_userinfo",
                state="STATE"):
redirect_url = urllib.parse.quote("http://zhang.tunnel.qydev.com/oauth")
return CONNECT_URL%(self.app_id, redirect_url, scope, state)
PHP中文网
PHP中文网

认证高级PHP讲师

全部回复(2)
大家讲道理

不能在localhost调试。另外可以查看参数的顺序。这个是有要求的。

Peter_Zhu

GET参数需要parse.urlencode吧?

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!