i am integrating facebook marketing api and when i call to the function which contains code for creating facebook campaign but i am getting below exception "An Api instance must be provided as argument or set as instance in the \FacebookAds\Api". below is the function where exceptions occur
protected static function assureApi(Api $instance = null) {
$instance = $instance ?: Api::instance();
if (!$instance) {
throw new \InvalidArgumentException(
'An Api instance must be provided as argument or '.
'set as instance in the \FacebookAds\Api');
}
return $instance;
}