Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 670
Sebastian Ż Avatar asked Mar 11 '15 09:03

Sebastian Ż


People also ask

What can you do with Facebook Marketing API?

What can the Facebook Marketing API do? The Marketing API is an HTTP-based API that you can use to query data, create and manage ads, and perform a wide variety of other tasks. The Marketing API can programmatically access Facebook's advertising platform and optimize your business operations.

Does Facebook allow API?

7. Access and post content in Facebook Groups. The Facebook API allows your app — and your app users — to access and manage content in their Facebook Group. With this API, you can let people publish content from your app to their Group.


1 Answers

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.

like image 64
Roemer Avatar answered Oct 11 '22 09:10

Roemer