FacebookAds.getAdSetsInCampaign()

get all ad sets in a campaign, and fetch standard metadata

get all ad sets for a given campaign group, and return id, daily budget, status

Usage

Hover over inputs/exits for more info.

var FacebookAds = require('dk-machinepack-facebookads');


// get all ad sets in a campaign, and fetch standard metadata

FacebookAds.getAdSetsInCampaign({

adCampaignGroupId: '31231321312',

accessToken: 'CAACEdEose0cBACBhZA7DJbYapwM7oZBt1EWhPiGqibBZAZAZCZCe6IOkfDRzrs1jyZCS93zSuj9GaNQQtxbny0jeSCqyBNaQUl3ocDiD3lO4GSboFm5B7NogSHFzTGYw0rdpndDKolQcfsS5nYeYwZAIKXF1WPzgGaGxNIDh36oZBHuazcN3WSNmL9jGyO9YmYlZBmZCcigBuMFvtXj4XlzNWyb',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

adCampaignGroupId required

facebook adCampaignGroup is the endpoint for a campaign

'31231321312'
accessToken required

this is the facebook issued access token for a given user and app pair

'CAACEdEose0cBACBhZA7DJbYapwM7oZBt1EWhPiGqibBZAZAZCZCe6IOkfDRzrs1jyZCS93zSuj9GaNQQtxbny0jeSCqyBNaQUl3ocDiD3lO4GSboFm5B7NogSHFzTGYw0rdpndDKolQcfsS5nYeYwZAIKXF1WPzgGaGxNIDh36oZBHuazcN3WSNmL9jGyO9YmYlZBmZCcigBuMFvtXj4XlzNWyb'

Exits

error

An unexpected error occurred.

success

OK.