'; $app_secret = ''; $app_id = ''; $id = ''; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'name' => 'Carousel app ad', 'object_story_spec' => array('page_id' => '','link_data' => array('message' => 'My message','link' => 'http://www.example.com/appstoreurl','caption' => 'WWW.ITUNES.COM','name' => 'The link name','description' => 'The link description','child_attachments' => array(array('link' => 'http://www.example.com/appstoreurl','image_hash' => '','call_to_action' => array('type' => 'USE_MOBILE_APP','value' => array('app_link' => ''))),array('link' => 'http://www.example.com/appstoreurl','image_hash' => '','call_to_action' => array('type' => 'USE_MOBILE_APP','value' => array('app_link' => ''))),array('link' => 'http://www.example.com/appstoreurl','image_hash' => '','call_to_action' => array('type' => 'USE_MOBILE_APP','value' => array('app_link' => ''))),array('link' => 'http://www.example.com/appstoreurl','image_hash' => '','call_to_action' => array('type' => 'USE_MOBILE_APP','value' => array('app_link' => '')))),'multi_share_optimized' => true)), ); echo json_encode((new AdAccount($id))->createAdCreative( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);