1
我正在整合facebook营销API,当我打电话给包含用于创建facebook广告系列的代码的功能,但我得到异常 “一个Api实例必须作为参数提供或设置为\ FacebookAds \ Api“中的实例。下面是其中的例外发生一个Api实例必须作为参数提供或作为实例提供在 FacebookAds Api
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;
}