|
@@ -12,9 +12,14 @@ class Kuaishou extends Base
|
|
public $access_token = '';
|
|
public $access_token = '';
|
|
public $debug = false;
|
|
public $debug = false;
|
|
//
|
|
//
|
|
- public static function getAccessToken()
|
|
|
|
|
|
+ public function getAccessToken()
|
|
{
|
|
{
|
|
-
|
|
|
|
|
|
+ //$url = $this->serverHost . "oauth2/access_token?app_id={$this->appKey}&app_secret={$this->appSecret}&code={$code}&grant_type=authorization_code";
|
|
|
|
+ $url = $this->serverHost . "oauth2/access_token?app_id={$this->appKey}&app_secret={$this->appSecret}&grant_type=client_credentials";
|
|
|
|
+ $Alibabahelper = new Alibabahelper();
|
|
|
|
+ $s = $Alibabahelper->curl_https_get($url);
|
|
|
|
+ $s = json_decode($s, true);
|
|
|
|
+ $this->success('ok',$s);
|
|
}
|
|
}
|
|
|
|
|
|
// api请求
|
|
// api请求
|