I'm working on an app which among other things, creates facebook ads via their API. Recently I have tried to create an ad which is of a "Click to messenger" type- that is- the call to action button is supposed to initiate a chat with the customers page.
I've followed this guide : https://developers.facebook.com/docs/marketing-api/guides/messenger-sponsored/
And did the following stuff:
- Applied for , and was granted the pages_messaging premission.
- Set the campaign objective to link clicks.
- Set the adset optimization_goal and billing_event to link_clicks, as instructed in the guide.
- It was all set correctly ( I did check in the ad manager)
I believe that the problem is set in my creative, which looks as follows:
` {
"creative_id": <CREATIVE_ID>,
"id": <ID>,
"name": <NAME>,
"object_story_spec": {
"page_id": <PAGE_ID>,
"video_data": {
"call_to_action": {
"type": "SHOP_NOW",
"value": {"app_destination":"MESSENGER"}
},
"image_url":<IMAGE_URL>,
"link_description": "",
"message": xxxxxxxxx,
"video_id": xxxxxxxx
}
},
"object_type": "VIDEO",
"title": "TITLE",
"video_id": <VIDEO_ID>
}
I replaced the real data with placeholders, but I did copy paste it from console.
Basically I did everything the guide said and what I got is-
`{
"error": {
"message": "Invalid parameter",
"error_user_title": "Creative and optimization_goal mismatch",
"is_transient": false,
"type": "OAuthException",
"error_user_msg": "The creative type contradicts to the
optimization goal. The type of your creative has to be consistent with your optimization goal. Also please make sure your optimization goal is not NONE.",
"code": 100,
"fbtrace_id": "A1AR9Egck+G",
"error_subcode": 1815159
}
`
Any insights will be highly appreciated- (: