'; $app_secret = ''; $app_id = ''; $id = ''; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'name' => 'Mobile App Installs Ad Set', 'daily_budget' => '1000', 'bid_amount' => '2', 'billing_event' => 'IMPRESSIONS', 'optimization_goal' => 'APP_INSTALLS', 'campaign_id' => '', 'promoted_object' => array('application_id' => '','object_store_url' => ''), 'targeting' => array('device_platforms' => array('mobile'),'facebook_positions' => array('feed'),'geo_locations' => array('countries' => array('US')),'publisher_platforms' => array('facebook','audience_network'),'user_os' => array('IOS')), 'status' => 'PAUSED', ); echo json_encode((new AdAccount($id))->createAdSet( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);