facebook / facebook-python-business-sdk

Python SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
1.33k stars 645 forks source link

ProductAudienceFields #57

Closed rooislangwtf closed 9 years ago

rooislangwtf commented 9 years ago

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';

ghost commented 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.

rituparnamukherjee commented 9 years ago

This looks like a PHP SDK issue. Please open an issue under- https://github.com/facebook/facebook-php-ads-sdk