Sebastian Ż
Sebastian Ż

Reputation: 61

Facebook Marketing API - adding ProductCatalog

I need help. I use developer app where I try add ProductCatalog to Business Manager. Earlier I add Multi Product and is it ok.

$catalog = new ProductCatalog(null,'<BUSINESS_ID>');
$catalog->setData(array(
    ProductCatalogFields::NAME => 'test',
));
$catalog->save();

I get error

(#275) Ad account cannot be determined for this request

When I try

$request = new FacebookRequest( $session, 'POST', '/<BUSINESS_ID>/product_catalogs',array('name'=>'test') );
$response = $request->execute();

I get

(#275) Ad account cannot be determined for this request

What happened? ProductCatalog need AdAcoountID? I add to app settings all adaccounts ids. Where I must add this in code. I have the newest API.

Upvotes: 6

Views: 1132

Answers (1)

Roemer
Roemer

Reputation: 3576

What is the level of Ads API access that the app you use has? As described here there are different levels. Since Product Catalogs uses Business Manager, you need to have Marketing API Access with the "Standard" level.

If your app is still on "Development" or "Basic" access, see the above mentioned documentation to read how you can apply for higher access.

You can see what level of access you have by going to you App Dashboard --> "Status and Review", create a new submission for review and see which permissions are available.

Upvotes: 3

Related Questions