FacebookAds.createAdSet()

create an ad set and the creative

return a paused campaign

Usage

Hover over inputs/exits for more info.

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


// create an ad set and the creative

FacebookAds.createAdSet({

fbUserId: '509503',

adCampaignGroupId: '3213213124',

adImages: '[\'fadlk3421jkl;rehui234\', \'1235tgds43q41234\']',

accessToken: 'CAACEdEose0cBACBhZA7DJbYapwM7oZBt1EWhPiGqibBZAZAZCZCe6IOkfDRzrs1jyZCS93zSuj9GaNQQtxbny0jeSCqyBNaQUl3ocDiD3lO4GSboFm5B7NogSHFzTGYw0rdpndDKolQcfsS5nYeYwZAIKXF1WPzgGaGxNIDh36oZBHuazcN3WSNmL9jGyO9YmYlZBmZCcigBuMFvtXj4XlzNWyb',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

fbUserId required

facebook user id

'509503'
adCampaignGroupId required

woo campaign group id

'3213213124'
adImages required

an array of image_hashes returned by facebook

'[\'fadlk3421jkl;rehui234\', \'1235tgds43q41234\']'
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.

{}