Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $api = Api::init($app_id, $app_secret, $access_token);
- $api->setLogger(new CurlLogger());
- $fields = array(
- 'name',
- 'objective',
- );
- $params = array(
- 'effective_status' => array('ACTIVE','PAUSED'),
- );
- $result = json_encode((new AdAccount($id))->getCampaigns(
- $fields,
- $params
- )->getResponse()->getContent(), JSON_PRETTY_PRINT);
- $result2 = json_decode($result);
- print_r($result2);
- foreach($result2 as $item){
- echo $item['name'];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement