承接 komptip/php-tiktok-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

komptip/php-tiktok-sdk

最新稳定版本:v1.1.0

Composer 安装命令:

composer require komptip/php-tiktok-sdk

包简介

PHP sdk for TikTok

README 文档

README

This package provides an wrapper for TikTok REST API for PHP 8.3 and later

Requirements

  • PHP >= 8.3

Installation

In your exist PHP application you can install this package using Composer.

composer require komptip/php-tiktok-sdk

Usage

Check documentation for basic understanding of configuration and usage, and user authentication for user authentication

Here is a basic example of how to use this package:

use Komptip\PhpTiktokSdk\PhpTiktokSdk;
use Komptip\PhpTiktokSdk\AuthorizationScope;
use Komptip\PhpTiktokSdk\UserField;

$tiktok = new PhpTiktokSdk('client_key', 'client_secret');

// Get auth url
$authUrl = $tiktok->createAuthUrl(
    scopes: [AuthorizationScope::UserInfoBasic, AuthorizationScope::UserInfoProfile],
    csrfState: $tiktok->createCsrfState(),
    redirectUri: 'https://example.com/callback'
);

// Get access token
$accessToken = $tiktok->getAccessToken($authorizationCode);

// Get user info
$userInfo = $tiktok->getUserInfo($accessToken['access_token'], [UserField::OpenID, UserField::Displayname]);

State of the project

This package is in early development stage. Not all endpoints are implemented yet.

License

This package is licensed under the MIT License.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-19