Home > Backend Development > PHP Tutorial > 微信菜单view跳转获取code问题

微信菜单view跳转获取code问题

WBOY
Release: 2016-06-06 20:24:42
Original
1421 people have browsed it

想要跳转的地址REDIRECT如:http://a.com/b/?c.d
构建view地址(服务号):https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT&response_type=code&scope=snsapi_base&state=1#wechat_redirect

问题是,通过微信可以打开这个跳转的页面,但通过复制页面地址还是显示构建的view地址,说明并没有跳转回传code,而我想要获取的地址是:htt://a.com/b/?c.d&code=xxxxxxx&state=1

如果传这种地址就可以获取到code:htt://a.com/b,即不带参数不带斜线的情况,有人遇到过这个问题么?

回复内容:

想要跳转的地址REDIRECT如:http://a.com/b/?c.d
构建view地址(服务号):https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT&response_type=code&scope=snsapi_base&state=1#wechat_redirect

问题是,通过微信可以打开这个跳转的页面,但通过复制页面地址还是显示构建的view地址,说明并没有跳转回传code,而我想要获取的地址是:htt://a.com/b/?c.d&code=xxxxxxx&state=1

如果传这种地址就可以获取到code:htt://a.com/b,即不带参数不带斜线的情况,有人遇到过这个问题么?

授权的URL参数有没有对?把代码贴出来看看。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template