Home  >  Q&A  >  body text

java - 微信开发获取用户信息时,回调的地址只能是顶级域名吗?

微信开发获取用户信息时,回调的地址只能是顶级域名吗?
我加上端口号就报redirect uri 参数错误。但是我要访问的服务是3000端口运行的?有实现的方法吗?

https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxaaa795183d1bdecd&redirect_uri=http%3a%2f%2fwww.boilermon.org%3a3000%2falarm&response_type=code&scope=snsapi_base&state=123#wechat_redirect

另外:如果只能顶级域名,那我把这个地址放在自定义菜单里不是不能跳转到想要的页面了?
ViewButton buttonView32 =new ViewButton();

    buttonView32.setUrl("https://open.weixin.qq.com/connect/oauth2/authorize?appid="+APPID+"&redirect_uri=http%3a%2f%2fwww.boilermon.org&response_type=code&scope=snsapi_base&state=123#wechat_redirect");
阿神阿神2764 days ago455

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:33:43

    It doesn’t matter whether it is a top-level domain name or not.
    As long as it is the authorized address configured in WeChat, it requires port 80.

    reply
    0
  • Cancelreply