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


手机端微信打开就是这样

以下是控制台的信息,我打印了请求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學習者快速成長!