FacebookAds.getAdCampaigns()

get ad campaigns for a given ad account

retrieves the ad account id for a given user

Usage

Hover over inputs/exits for more info.

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


// get ad campaigns for a given ad account

FacebookAds.getAdCampaigns({

adAccountId: 'act_230989',

accessToken: 'CAACEdEose0cBACBhZA7DJbYapwM7oZBt1EWhPiGqibBZAZAZCZCe6IOkfDRzrs1jyZCS93zSuj9GaNQQtxbny0jeSCqyBNaQUl3ocDiD3lO4GSboFm5B7NogSHFzTGYw0rdpndDKolQcfsS5nYeYwZAIKXF1WPzgGaGxNIDh36oZBHuazcN3WSNmL9jGyO9YmYlZBmZCcigBuMFvtXj4XlzNWyb',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

adAccountId required

facebook ad account id

'act_230989'
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.