FacebookAds.getCampaignOverview()

return the ad set data, ad data, and ad creative, for all ad sets in campaign

fetch all ads in ad set and then return top performing ad, determined by impressions served.

Usage

Hover over inputs/exits for more info.

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


// return the ad set data, ad data, and ad creative, for all ad sets in campaign

FacebookAds.getCampaignOverview({

adCampaignGroupId: '31231321312',

accessToken: 'CAACEdEose0cBACBhZA7DJbYapwM7oZBt1EWhPiGqibBZAZAZCZCe6IOkfDRzrs1jyZCS93zSuj9GaNQQtxbny0jeSCqyBNaQUl3ocDiD3lO4GSboFm5B7NogSHFzTGYw0rdpndDKolQcfsS5nYeYwZAIKXF1WPzgGaGxNIDh36oZBHuazcN3WSNmL9jGyO9YmYlZBmZCcigBuMFvtXj4XlzNWyb',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// when there are no campaigns yet in the campaign group

noCampaignsYet: function (result) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

adCampaignGroupId required

an adcampaigngroup is 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.

noCampaignsYet

when there are no campaigns yet in the campaign group

{}
success

OK.

{}