Facebook广告活动Nodejs

时间:2019-11-02 07:18:02

标签: node.js facebook-graph-api facebook-ads-api

我想通过创建Facebook广告系列来创建Facebook广告,但是遇到special_ad_category错误无法解决

const createCompainNew = async () => {
let test5 = 'Create Edge';
let create = await account.createCampaign([special_ad_category], {
    [Campaign.Fields.name]: 'Test Campaign - Delete',
    [Campaign.Fields.status]: Campaign.Status.paused,
    [Campaign.Fields.objective]: Campaign.Objective.page_likes,
})
    .then(campaign => {
        console.log(campaign)
        logPassedTest(test5 + ':Pass', account);
    })
    .catch(errorFunction(test5));
    return create
}

1 个答案:

答案 0 :(得分:2)

我尝试了很多事情,但最终尝试了这一点,并成功制作了一个广告系列

const createCompainNew = async () => {
let test5 = 'Create Edge';
let special_ad_category = "NONE"
let create = await account.createCampaign([], {
    special_ad_category : special_ad_category,  
    [Campaign.Fields.name]: 'Test Campaign - Delete',
    [Campaign.Fields.status]: Campaign.Status.paused,
    [Campaign.Fields.objective]: Campaign.Objective.page_likes,
})
    .then(campaign => {
        console.log(campaign)
        logPassedTest(test5 + ':Pass', account);
    })
    .catch(errorFunction(test5));
return create
}