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


手机端微信打开就是这样

以下是控制台的信息,我打印了请求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讲师

reply all(2)
大家讲道理

Cannot debug on localhost. You can also view the order of parameters. This is required.

Peter_Zhu

The GET parameter needs parse.urlencode, right?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!