Answer the question
In order to leave comments, you need to log in
Facebook API Marketing how to solve creative problem?
I'm making a request to the Facebook Marketing API to generate an ad creative, the code looks like this:
def CreateDoLink(self, ad_acc_id, name, link, message, page_id, typeBtn):
st = "https://graph.facebook.com/v11.0/act_" + ad_acc_id + "/adcreatives"
post = {"name": name,
#"ad_format": "COLLECTION",
"object_story_spec": {
"link_data": {
"call_to_action": {"type":typeBtn,"value":{"link":link}},
"link": link,
"message": message
},
"description": "this is description",
"page_id":page_id
},
"access_token": self.access_token
}
req = requests.post(st, data=post)
return req.text
{"error":{"message":"Invalid parameter","type":"OAuthException","code":100,"error_subcode":1815166,"is_transient":false,"error_user_title":"Invalid creative's object story spec","error_user_msg":"<b>Invalid creative's object story spec, please check the format of your object story spec.</b>"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question