I am able to get Facebook Campaign Insights using the marketing API, but I can only get it for a said period of time. The code below gives data for last 30 days. How can I get a dropdown to get data for user input period (eg. 60days or 1 day or 1 week etc). Please let me know the code. As per developers site, available presets: date_preset enum{today, yesterday, last_3_days, this_week, last_week, last_7_days, last_14_days, last_28_days, last_30_days, last_90_days, this_month, last_month, this_quarter, last_3_months, lifetime}
$params = array (
'date_preset'=>'last_30_days',
'data_columns'=>"['adgroup_id','actions','reach']",
);
?>