yc-hwc/laravel-tiktok
最新稳定版本:1.0.11
Composer 安装命令:
composer require yc-hwc/laravel-tiktok
包简介
PHP Tiktok SDK
README 文档
README
tiktok SDK
安装教程
composer require yc-hwc/laravel-tiktok
用法
tiktok api version=202309
配置
$config = [
'tiktokUrl' => '',
'appKey' => '',
'appSecret' => '',
'accessToken' => '',
'shopCipher' => '',
];
$tiktokClient = \PHPTiktok\V202309\TiktokClient::config($config);
获取订单列表
$config = [
'tiktokUrl' => '',
'appKey' => '',
'appSecret' => '',
'accessToken' => '',
'shopCipher' => '',
];
$tiktokClient = \PHPTiktok\V202309\TiktokClient::config($config);
$response = $tiktokClient->order()->api('orders')
->withBody([
'order_status' => 'UNPAID',
])
->withQueryString([
'page_size' => 1
])->port();
print_r($response);die;
tips: /开头为绝对路径uri,不是/开头为相对路径uri,建议使用绝对路径uri
tiktok api version < 202309
配置
$config = [
'tiktokUrl' => '',
'appKey' => '',
'appSecret' => '',
'accessToken' => '',
'shopId' => '',
'shopCipher' => '',
];
$tiktokSDK = \PHPTiktok\TiktokSDK::config($config);
店铺授权
$config = [
'tiktokUrl' => '',
];
$tiktokSDK = \PHPTiktok\TiktokSDK::config($config);
return [
'redirectUrl' => $tiktokSDK->oauth()->api('authorize')
->withQueryString(array_filter([
'app_key' => '',
'state' => '',
]))
->fullUrl()
];
获取订单列表
$config = [
'tiktokUrl' => '',
'appKey' => '',
'appSecret' => '',
'accessToken' => '',
'shopId' => '',
'shopCipher' => '',
];
$tiktokSDK = \PHPTiktok\TiktokSDK::config($config);
$response = $tiktokSDK->order()->api('/api/orders/search')
->withBody([
'page_size' => 20,
])->post();
print_r($response);
tips: /开头为绝对路径uri,不是/开头为相对路径uri,建议使用绝对路径uri
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2022-08-05