Hello,
I am setting start time like ‘2021-10-04T11:05:28Z’ and end time like ‘2021-10-05T11:05:28Z’ and send those values to twitter-ads-api-php-sdk functions setStartTime() and setEndTime() respectively.
But when I submit my form with those values then the API of line item submission will not get response.
Here is my sample code for it.
$api = TwitterAds::init(CONSUMER_KEY, CONSUMER_SECRET, $_POST['oauth_token'], $_POST['oauth_token_secret']);
$account_id = $_POST['account_id'];
$account = new Account($account_id);
$account->read();
$campaign_id = $_POST['campaignId'];
$lineItem = new LineItem();
$lineItem->setCampaignId($campaign_id);
if(!empty($_POST['adGroupStartDate']))
{
$lineItem->setStartTime($_POST['adGroupStartDate']); // Set Ad Group Start date
}
if(!empty($_POST['adGroupEndDate']))
{
$lineItem->setEndTime($_POST['adGroupEndDate']); // Set Ad Group End date
}
here -
$_POST[‘adGroupStartDate’] = ‘2021-10-04T11:05:28Z’;
$_POST[‘adGroupEndDate’] = ‘2021-10-05T11:05:28Z’;
Thanks.
Any solution for this ? Please give me reply as soon as possible.