Closed rooislangwtf closed 9 years ago
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.
This looks like a PHP SDK issue. Please open an issue under- https://github.com/facebook/facebook-php-ads-sdk
I got an "Undefined class constant 'RETENTIONSECONDS'" error using the following code: $audience = new ProductAudience(null, 'act');
$audience->setData(array(
ProductAudienceFields::NAME => 'Product Audience',
ProductAudienceFields::PRODUCT_SET_ID => '',
ProductAudienceFields::PIXEL_ID => '',
ProductAudienceFields::INCLUSIONS => array(array(
ProductAudienceFields::RETENTION_SECONDS => 1296000,
ProductAudienceFields::RULE => array(
'event'=>array('eq'=>'ViewContent')
)
))
));
$audience->save();
I managed to fix it by adding the following constants to the ProductAudienceFields abstract class of ProductAudienceFields.php file in FacebookAds\Object\Fields : const RETENTION_SECONDS = 'retention_seconds'; const RULE = 'rule';