控制器中操控转向链接

浏览:680 发布日期:2014/10/17 分类:求助交流 关键字: code auth2 wechat
求助:
第一步:控制器中需要转向 “https://open.weixin.qq.com/connect/oauth2/authorize?appid={$this->app_id}&redirect_uri={$redirect_uri}&response_type=code&scope=snsapi_userinfo&state={$state}#wechat_redirect”后的页面获取code值;
第二步:获取到code值后再转向https://api.weixin.qq.com/sns/oauth2/access_token?appid={$this->app_id}&secret={$this->app_secret}&code={$code}&grant_type=authorization_code获取这个页面的json,注意,$code就是$_GET到的code值!
尝试用了header("Location:.........");可以走通第一步,用两个header的话就获取不了code值了!

怎么操作获取到最终的json值!!!
最佳答案
评论() 相关
后面还有条评论,点击查看>>