1. Go to this page and download the library: Download pmg/twitterads 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/ */
pmg / twitterads example snippets
$twitter = new \PMG\TwitterAds\TwitterAds(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, TOKEN_SECRET);
//We will assume for the rest of the examples that $twitter is defined.
use PMG\TwitterAds\TailoredAudiences\TailoredAudienceRequest;
$request = new TailoredAudienceRequest('accounts/:account_id/tailored_audiences', ['account_id' => ACCOUNT]);
$response = $twitter->send($request);
//Returns PMG\TwitterAds\Response