PHP code example of nbyang / ads-marketing-api
1. Go to this page and download the library: Download nbyang/ads-marketing-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nbyang / ads-marketing-api example snippets
// 获取token, refresh_token
$auth = new ToutiaoSdk\ToutiaoAuth(APPID, SECRET);
print_r($auth->getAccessToken(AUTH_CODE));
// 刷新token
print_r($auth->refreshToken(REFRESH_TOKEN));
// 调用示例
$client = new ToutiaoSdk\TouTiaoClient(TOKEN);
$args = [];
$req = $client::AdvertisingDelivery()->campaignGet()->setArgs($args)->send();
var_dump($req->getBody());