In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how Thinkphp integrates Douyin SDK". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how Thinkphp integrates Douyin SDK".
Step 1: download Douyin's official SDK
Download address: Douyin SDK official download: https://open.douyin.com/platform/doc/OpenAPI-devtool-sdk_download
Just select the Php download address to download.
Step 2: import SDK
1. Extract the downloaded zip file
two。 Create a new Douyin directory under the extend directory under the root directory of the thinkphp project (at the same level as the application directory), and then create a new Open directory in the Douyin directory
3. Copy all the files and folders in the extracted php-sdk/douyin_open/lib directory to the newly created Douyin\ Open directory.
The directory structure after the replication is completed is as follows
Step 3: install guzzlehttp dependencies
Because the SDK of Douyin is basically based on requests sent by guzzlehttp, you need to install dependencies
I use Composer to install here. If you haven't installed Composer, please install it first.
1. Execute a command
Composer require guzzlehttp/guzzle:~6.0
two。 You can call the interface after the installation is completed.
Step 4: call the API
You can refer to the download SDK built-in php-sdk\ douyin_open\ test\ Api for calling the API. Most of the API calling methods can be found in the API call.
I will only demonstrate authorization and obtain user information here.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.