ydg / douyin-open-sdk
更易于访问抖音开放API
v1.0.0
2023-09-15 06:51 UTC
Requires
- php: ^7.0|^8.0
- ext-json: *
- ydg/foudation-sdk: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.12
- phpunit/phpunit: ^9.5
- vlucas/phpdotenv: ^5.5
This package is auto-updated.
Last update: 2024-09-15 09:26:21 UTC
README
让PHP开发者更容易访问抖音开放API
使用以下命令安装最新版本
$ composer require ydg/douyin-open-sdk
基本用法
获取客户端令牌
<?php namespace Ydg\DouyinOpenSdk\Douyin; $app = new Douyin(); $app->oauth->client_token([ 'client_key' => 'your client key', 'client_secret' => 'your client secret', ]);
搜索产品
<?php namespace Ydg\DouyinOpenSdk\Douyin; $app = new Douyin([ 'access_token' => 'your access_token' ]); $app->lifeOutsideDistribution->search_product([ 'uid' => 'your uid', 'cursor' => 0, 'count' => 10, 'sort_by' => 1, 'order_by' => 1, ]);