现在用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抽取出来单独访问就不会提示了,有些则还会提示,请问后面的这个是怎么实现的?有什么比较好的统一实现的方法?
迷茫2017-04-17 17:58:23
Two modes of WeChat authorization
Use callback link for authorization
Use WeChat’s jsapi to obtain user information and authorization
You should be asking about the second option
高洛峰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