2016-09-14 7 views
1

FacebookのグラフAPI経由で広告を作成しようとしています。キャンペーン、広告セット、クリエイティブを作成できました。広告を作成しようとすると、次のエラーが表示されます。Facebook Marketing APIエラー、宣伝するオブジェクトを選択する必要があります

{"error"=>{"message"=>"Invalid parameter", "type"=>"OAuthException", "code"=>100, "error_subcode"=>1487930, "is_transient"=>false, "error_user_title"=>"You Must Select an Object to Promote", "error_user_msg"=>"Your campaign must include an ad set with a selected object to promote related to your objective (ex: Page, URL, event). Please update your ad set to continue.", "fbtrace_id"=>"BVtDHG2rTNn"}} 

私は次のparamsとエンドポイントhttps://graph.facebook.com/v2.7/act_XXXXXXX/adsからPOST呼び出し、作られた:誰もが問題で私を助けることができる

{:name=>"Buy new Item", :object_story_spec=>{:link_data=>{:call_to_action=>{:value=>{}, :type=>"LEARN_MORE"}, :name=>"Buy new Item", :message=>"amazing Items for you", :image_hash=>"7cc87683d1b75492622a82a158790dcb", :link=>"www.xyz.com"}, :page_id=>"123123123"}, :access_token=>"xxxxxxxxxxxxxxxxxxxx"} 

を?

P.S.このSO question also faces the same problem on PHP SDK

答えて

1

このエラーは、広告オブジェクトの作成中にAdCreative IDが指定されていない場合にもスローされます。

広告エンドポイントにAdCreativeパラメータを投稿しようとしています。

curl \ 
    -F 'name=My Ad' \ 
    -F 'adset_id=<AD_SET_ID>' \ 
    -F 'creative={"creative_id":"<CREATIVE_ID>"}' \ 
    -F 'status=PAUSED' \ 
    -F 'access_token=<ACCESS_TOKEN>' \ 
    https://graph.facebook.com/v2.8/act_<AD_ACCOUNT_ID>/ads 
関連する問題