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

调式微博登录

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