facebook / facebook-php-business-sdk

PHP SDK for Meta Marketing API
https://developers.facebook.com/docs/business-sdk
Other
818 stars 514 forks source link

Error '(#100) Missing parameter(s): customer_file_source' when creating custom audience #457

Closed adarmanto closed 5 years ago

adarmanto commented 5 years ago

Hello,

I followed this sample code to create a custom audience https://github.com/facebook/facebook-php-business-sdk/blob/master/examples/custom_audiences.php, it was working fine before. But recently I got this error below, I have updated the sdk to newer version (v3.0.4) also remain same issue.

exception 'FacebookAds\Http\Exception\AuthorizationException' with message '(#100) Missing parameter(s): customer_file_source' in /var/www/vhosts/xxx/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Exception/RequestException.php:144
Stack trace:
#0 /var/www/vhosts/xxx/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Client.php(215): FacebookAds\Http\Exception\RequestException::create(Object(FacebookAds\Http\Response))
#1 /var/www/vhosts/xxx/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Request.php(282): FacebookAds\Http\Client->sendRequest(Object(FacebookAds\Http\Request))
#2 /var/www/vhosts/xxx/vendor/facebook/php-business-sdk/src/FacebookAds/Api.php(162): FacebookAds\Http\Request->execute()
#3 /var/www/vhosts/xxx/vendor/facebook/php-business-sdk/src/FacebookAds/Api.php(204): FacebookAds\Api->executeRequest(Object(FacebookAds\Http\Request))
#4 /var/www/vhosts/xxx/vendor/facebook/php-business-sdk/src/FacebookAds/Object/AbstractCrudObject.php(241): FacebookAds\Api->call('/act_38834xxx...', 'POST', Array)
#5 /var/www/vhosts/xxx/export/fb-audience-cron.php(164): FacebookAds\Object\AbstractCrudObject->create()

Any suggestion to solve this issue?

adarmanto commented 5 years ago

Opps sorry, it was new changes in API https://developers.facebook.com/ads/blog/post/2018/06/13/sharing-custom-audiences/

By adding new required param customer_file_source solve this issue.