Closed shanmukhark closed 9 years ago
You should catch that exception, it will contain more info. Take a look at the exception methods here: https://github.com/facebook/facebook-php-ads-sdk/blob/master/src/FacebookAds/Http/Exception/RequestException.php#L160-L190
you should wrap your code into:
try { // your code here } catch (\FacebookAds\Http\Exception\RequestException $e) { echo $e->getErrorUserMessage(); // etc ... }
Closing this as u should find there what's wrong with your request. Feel free to re-open if necessary
Thanks Pruno, I have chosen 'page_types' => array('mobilefeed') on TargetingSpecs to resolve it finally:-)
SDK version: 2.4
This flow works fine with Website Click Objective, however with the objective MOBILE_APP_INSTALLS fails. Please help me to locate the problem as error is not helping much to find the problem.
Regeneration Code:
Error:
Fatal error: Uncaught exception 'FacebookAds\Http\Exception\AuthorizationException' with message 'Invalid parameter' in /home/ads_api/sdk/FacebookAds/Http/Exception/RequestException.php:137 Stack trace: #0 /home/ads_api/sdk/FacebookAds/Http/Client.php(216): FacebookAds\Http\Exception\RequestException::create(Array, 500) #1 /home/ads_api/sdk/FacebookAds/Http/Request.php(282): FacebookAds\Http\Client->sendRequest(Object(FacebookAds\Http\Request)) #2 /home/ads_api/sdk/FacebookAds/Api.php(152): FacebookAds\Http\Request->execute() #3 /home/ads_api/sdk/FacebookAds/Api.php(194): FacebookAds\Api->executeRequest(Object(FacebookAds\Http\Request)) #4 /home/ads_api/sdk/FacebookAds/Object/AbstractCrudObject.php(248): FacebookAds\Api->call('/act_1015278785...', 'POST', Array) #5 /home/ads_api/sdk/FacebookAds/Object/AbstractCrudOb in /home/ads_api/sdk/FacebookAds/Http/Exception/RequestException.php on line 137
Regards, Shanmukh