composer require kangdev/douyin -vvv
<?php
$config = [
'appid' => 'your-app-id',
'secret' => 'your-secret',
'debug' => true,
'log' => [
'name' => 'douyin',
'file' => __DIR__ . '/douyin.log',
'level' => 'debug',
'permission' => 0777,
],
];
$dispatch = new \KangDev\DouyinDispatch\Dispatch($config);
// getAccessToken
$dispatch->token([
'grant_type' => 'client_credential',
]);
//code2Session
$code = '';
$dispatch->jscode2session([
'code' => $code
]);