Skip to content

Commit 941bbf3

Browse files
committed
fix: drop description for simple video creatives — unsettable in Meta API v24
Meta API v24 rejects description in both video_data and call_to_action.value.link_description (deprecated). The description parameter is silently ignored for simple video creatives.
1 parent ed14656 commit 941bbf3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

meta_ads_mcp/core/ads.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,8 +1080,9 @@ async def create_ad_creative(
10801080
if headline:
10811081
video_data["title"] = headline
10821082

1083-
if description:
1084-
video_data["description"] = description
1083+
# NOTE: Meta API v24 rejects "description" in video_data AND
1084+
# "link_description" in call_to_action.value (deprecated).
1085+
# Description is not settable for simple video creatives.
10851086

10861087
# Build call_to_action with the destination URL.
10871088
# For video creatives, link_url MUST go in call_to_action.value.link

tests/test_video_creatives.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ async def test_simple_video_creative_uses_video_data():
7272
assert "link" not in video_data, "link must NOT be in video_data directly"
7373
assert video_data["message"] == "Check out this video"
7474
assert video_data["title"] == "Watch Now"
75-
assert video_data["description"] == "Amazing content"
75+
# description is not settable for simple video creatives (Meta API v24
76+
# rejects it in both video_data and call_to_action.value)
77+
assert "description" not in video_data
7678
assert video_data["call_to_action"]["type"] == "LEARN_MORE"
7779
assert video_data["call_to_action"]["value"]["link"] == "https://example.com/"
7880

0 commit comments

Comments
 (0)