作者 景龙
1 个管道 的构建 通过 耗费 0 秒

调式微博登录

@@ -387,6 +387,15 @@ class LoginController extends HomeBaseController @@ -387,6 +387,15 @@ class LoginController extends HomeBaseController
387 $this->redirect('/portal/login/thirdLogin'); 387 $this->redirect('/portal/login/thirdLogin');
388 } 388 }
389 $token = $json_arr['access_token']; 389 $token = $json_arr['access_token'];
  390 +
  391 + $url = 'https://api.weibo.com/2/statuses/share.json';
  392 + $data = [
  393 + 'access_token' => $token,
  394 + 'status' => URLencode('http://www.starplanet.cn/portal/enjoy/getEnjoyDetail?id=52')
  395 + ];
  396 + $res = $this->http_post($url,$data);
  397 + $json_arr = json_decode($res,true);
  398 + var_dump($json_arr);exit;
390 //存token到session 399 //存token到session
391 session('token', $token); 400 session('token', $token);
392 $uid = $json_arr['uid']; 401 $uid = $json_arr['uid'];