I am trying to create a facebook Adaccount with Facebook Business SDK. But when I use method createAdAccount
it gives me an error. please see the image attached below. Here is the documentation about adacount creation
I am using createAdAccount
like this.
public function createAdAccount() {
//$params['name'] = "My test Partner";
$params = ['name' => 'My test Partner',
'currency' => 'USD',
'timezone_id' => 1,
'end_advertiser'=> 'NONE',
'media_agency' => 'UNFOUND',
'partner' => 'UNFOUND'
];
$buisness = new Business('<buisness account id>');
$adacount = $buisness->createAdAccount(['name'], $params);
echo "<pre>"; print_r($adacount);
}
Update :
I also added my app id in my business account here.
Any help would be appreciated. Thanks in advance.