while developing facebook adset I got an error 'invalid parameter' the log files says that the error in 'targeting' but I see the facebook documentation and just copying the targrting code to try it but also getting same error any suggestions ?
Error:
/opt/bitnami/apps/mautic/htdocs/vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Client.php (line #216): at FacebookAds\Http\Exception\RequestException :: create ( array('error' => array('message' => 'Invalid parameter', 'type' => 'FacebookApiException', 'code' => '100', 'error_data' => array('blame_field_specs' => array(array('targeting'))), 'error_subcode' => '1487908', 'is_transient' => false, 'error_user_title' => 'Incompatible placement for ad objective', 'error_user_msg' => 'The given placement is incompatible with ad's objective.', 'fbtrace_id' => 'EyB0kTXDMOa')), '500' )
Targeting code :
$result = TargetingSearch::search(
TargetingSearchTypes::INTEREST,
null,
'soccer');
$targeting = new TargetingSpecs();
$targeting->{TargetingSpecsFields::GEO_LOCATIONS} =
array(
'countries' => array('US')
);
$targeting->{TargetingSpecsFields::INTERESTS} = array(
array(
'id' => 6003107902433,
'name' => 'Association football (Soccer)',
));
code while using in adset :
AdSetFields::TARGETING => $targeting,


View Solution