标题: 【已结案】qq第三方登陆,灵异事件
时间: 2019-05-10发布,2019-05-13修改
public function query()
{
$code=$this->code;
$url='https://graph.qq.com/oauth2.0/token?grant_type=authorization_code&client_id='.$this->app_id.'&client_secret='.$this->secret.'&code='.$code.'&redirect_uri='.urlencode($this->oauth_redirect_uri);
echo '请求接口:'.htmlspecialchars($url);
$result= $this->curl($url,null);
echo "<br>".'请求结果:'.$result;
if(strpos('access_token=',$result)===false)
{
return ['errorcode'=>1,'errormsg'=>'无效的接口返回'];
}
$access_token=substr($result,strlen('access_token=')-1,strpos('&',$result));
echo $access_token;
}
『回复列表(6|隐藏机器人聊天)』