facebook / facebook-php-business-sdk

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

Exception: field 'id' is required Error #578

Closed enescantas closed 1 year ago

enescantas commented 1 year ago

I get the following error. It is based on the library. I am using PHP 7.2.34. How can I downgrade the library version if it's due to version?

Exception: field 'id' is required. in /public_html/modules/addons/facebook_pixel_conversion_api/vendor/facebook/php-business-sdk/src/FacebookAds/Object/AbstractCrudObject.php:169 Stack trace:

0 /public_html/modules/addons/facebook_pixel_conversion_api/vendor/facebook/php-business-sdk/src/FacebookAds/Object/AdsPixel.php(202): FacebookAds\Object\AbstractCrudObject->assureId()

1 /public_html/modules/addons/facebook_pixel_conversion_api/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/EventRequest.php(286): FacebookAds\Object\AdsPixel->createEvent(Array, Array)

2 /public_html/modules/addons/facebook_pixel_conversion_api/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/EventRequest.php(277): FacebookAds\Object\ServerSide\EventRequest->defaultExecute()

3 /public_html/modules/addons/facebook_pixel_conversion_api/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/EventRequest.php(247): FacebookAds\Object\ServerSide\EventRequest->sendToCAPIEndpoint()

4 /public_html/modules/addons/facebook_pixel_conversion_api/hooks.php(136): FacebookAds\Object\ServerSide\EventRequest->execute()

5 /public_html/includes/hookfunctions.php(0): WHMCS\Utility\SafeInclude::{closure}(Array)

6 /public_html/vendor/whmcs/whmcs-foundation/lib/Admin.php(0): run_hook('AdminAreaHeadOu...', Array)

7 /public_html/vendor/whmcs/whmcs-foundation/lib/Admin.php(0): WHMCS\Admin->output()

8 /public_html/admin/clientssummary.php(0): WHMCS\Admin->display()

9 {main}

enescantas commented 1 year ago

I also got such error on localhost. But conversion is worked. https://prnt.sc/N7Gvyr_oL1sO

enescantas commented 1 year ago

My bad. The problem is solved.

liljefelt commented 4 months ago

My bad. The problem is solved.

Did you find out what the issue was? I'm seeing the same error: field 'id' is required and can't find any reference to what I should be doing.