Facebook APIを使用して作成したFacebookキャンペーン、adSetおよびadcreativeがあります。私はこれらの3つのエンドポイント(:I think they are called endpoints)
を使用して広告を作成しようとすると、しかし、それはここでエラーNo creative spec found for given adgroup.
を与える以前に作成した画像、adsetsやキャンペーンで広告を作成するために私のコードは次のとおりです。FB apiを使用してFacebook広告を作成しているときに、特定の広告グループにクリエイティブ仕様が見つかりません
FB.api('act_xxxxxxxx/adcreatives', 'POST', {
name: 'My Testworthy Ad Creative',
title: 'Facebook Marketing Partners',
body: 'Get exactly the things you need from your marketing.',
image_url: 'img url',
object_url: 'https://www.facebookmarketingpartners.com',
access_token:'app access token for selected permissions'
},function(adcreativeresponse){
console.log(adcreativeresponse.id);
FB.api('/act_xxxxxxxx/ads','POST', {
creative:["{\"creative_id\" : \"adcreativeresponse.id /*or a static creative_id*/\"}"],
name:"tryncatch",
adset_id:"adsetId",
status:"PAUSED",
access_token:"app access token with the required permissions selected"},
function(response) {
console.log("response for ad");
console.log(response);//
Insert your code here
}
);
});
コードに示されているように、私が作成adcreative
はadcreative
のノードIDを返します。これはresponse
関数で使用して、先にすべてのパラメータを集めたad
を作成しますが、ログ"response for ad"
の後に表示される画像に示すようにエラーが発生します。
ここには何かがありますか?
私は同じ問題を抱えているが、Pythonで。 私は 'adset_id'と' creative'を提供しますが、同じ古い '特定の広告グループに対してクリエイティブ仕様が見つかりません 'を取得します。私は答えが見つかると更新するでしょう –
{"creative_id":} '(配列なし) –
こんにちはJun、私は" [""] "を使わずに試してみました。広告との互換性がありません。それはあなたのために動いたのですか? – rawatdeepesh