发布FB广告组时,我收到错误广告系列1487006

时间:2014-08-01 14:37:04

标签: facebook-graph-api

它说“您必须指定一个广告系列,并且指定的广告系列必须属于指定的帐户,不得删除。”

即使我非常确定该广告系列已创建,但未删除且属于此广告帐户。

请参阅随附的屏幕截图。 https://www.dropbox.com/s/85o82n2e2z6091z/Screenshot%202014-08-01%2018.38.56.png https://www.dropbox.com/s/s9qg48ud90b3tnb/Screenshot%202014-08-01%2018.08.24.png

这是代码

//创建广告系列   graph.post(ad_account_id +'/ adcampaign_groups',campaign_data,function(err,cdata){

var campaign_id = cdata['id'];
console.log(campaign_id);
console.log(cdata);

//create the creative first
graph.post(ad_account_id+'/adcreatives', creative_data, function(err, data){
  //save to content
  //res.jsonp(data);
  content.facebook_ad_creative_id = data['id'];
  content.save(function(err, content){


        console.log(campaign_id);

        //create an ad.
        var options = {
          'name' : 'promoting post '+content.content,
          'bid_type' : 'CPM',
          'campaign_id' : campaign_id,
          'max_bid' : req.query['max_bid'],
          'creative' : { 'creative_id' : content.facebook_ad_creative_id },
          'targeting' : FacebookHelper.extract_targeting_spec_from_url(req)
        }
        console.log(options);
        console.log(ad_account_id);
        graph.post( ad_account_id+'/adgroups', options, function(err, data) {
            res.jsonp(data);
        });
  });

});

1 个答案:

答案 0 :(得分:0)

FB广告API的命名问题,campaign_id这里实际上意味着adset_id
https://developers.facebook.com/docs/reference/ads-api/adgroup#create