search

Home  >  Q&A  >  body text

java - SpringBoot 微信开发

现在用SpringBoot进行开发微信,想实现所有的页面只能在微信中打开,不是微信则提示:请在微信客户端打开链接。
我这边看到如果使用微信的网页授权接口https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
访问的话会有这个提示,但是有些网站如果把中间的REDIRECT_URI抽取出来单独访问就不会提示了,有些则还会提示,请问后面的这个是怎么实现的?有什么比较好的统一实现的方法?

PHPzPHPz2891 days ago559

reply all(3)I'll reply

  • 迷茫

    迷茫2017-04-17 17:58:23

    Two modes of WeChat authorization

    1. Use callback link for authorization

    2. Use WeChat’s jsapi to obtain user information and authorization
      You should be asking about the second option

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 17:58:23

    WeChat has js to judge, just use that js

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:58:23

    In which terminal the page is opened, you can determine the UA and use a filter or interceptor to deal with it

    reply
    0
  • Cancelreply