ydg/douyin-open-sdk

更易于访问抖音开放API

v1.0.0 2023-09-15 06:51 UTC

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,
]);