跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
营销与销售

meta-ads

Build and verify Meta (Facebook/Instagram) ad campaigns end to end via the Marketing API — account/app/system-user permission chain, Special Ad Category constraints, crop-safe story creative, campaign creation, and conversion tracking that is actually proven to work. Use when launching or debugging Meta campaigns, Meta pixel, or Conversions API. Encodes the exact API rejections, permission gotchas and false-negative verification traps hit in production.

boringmarketer · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add boringmarketer/kimi-first --skill meta-ads

技能说明


name: meta-ads description: "Build and verify Meta (Facebook/Instagram) ad campaigns end to end via the Marketing API — account/app/system-user permission chain, Special Ad Category constraints, crop-safe story creative, campaign creation, and conversion tracking that is actually proven to work. Use when launching or debugging Meta campaigns, Meta pixel, or Conversions API. Encodes the exact API rejections, permission gotchas and false-negative verification traps hit in production."

Meta Ads — launch and verification

Everything here was learned by getting it wrong in production first. The API rejections are real rejections, the permission chain is the one that actually unblocks, and the verification section exists because measuring the wrong thing produced three confidently-wrong conclusions in a single session.


1. Verification comes first, because it is where the damage happens

Read this before believing any test result.

Three separate false negatives in one launch. Each looked like a real bug. Each was the instrument, not the system.

TrapWhat happenedWhat to use instead
Testing on localhostVerified the pixel and an embed on localhost. Both were blocked in production by a CSP that localhost does not have.Always verify against the deployed URL. A localhost pass proves nothing about production headers.
performance.getEntriesByType('resource')Concluded "the Lead never fires" because no beacon appeared. fbevents uses navigator.sendBeacon when an eventID is present, and sendBeacon never appears in resource timing.Meta's Test Events tool. It is Meta's own instrumentation and it ends the argument.
"Received From: Browser" in Test EventsConcluded the server-side CAPI was broken because no server rows appeared. Test Events only shows server events if the server sends a test_event_code.Have the server return its own send result (see §6). Absence of display ≠ absence of delivery.

The pattern: absence of evidence was read as evidence of absence, from an instrument that structurally could not observe the thing being measured. Before concluding something is broken, ask what the instrument can actually see.

Confounded variables. One "isolation test" removed two variables at once and the wrong one got the blame. Change one thing.


2. The permission chain (the part that actually blocks you)

To create ads via API you need four separate grants. Missing any one gives a different, unhelpful error.

  1. A Meta app — you almost certainly already have one; don't create a new one.
  2. The system user has a ROLE ON THE APP. Business Settings → Apps → app → Assign people → pick the system user → Develop app. Skipping this gives No permissions available — assign an app role to the system user at the token-generation step, with no hint about which grant.
  3. The system user has the ASSETS. System Users → user → Assign assets:
    • Ad account → Manage campaigns (not "Manage ad accounts", which is finances and permissions)
    • Page → Ads only
    • Pixel/dataset → Use events dataset
  4. Generate the token — System Users → Generate token → app → Never expiry → tick ads_management.

Two more that only surface at ad-creation time:

  • Instagram account connected to the ad account. Advantage+ placements include IG, and creation fails with "Ad account has no access to this Instagram account". Fix: Business Settings → Instagram accounts → account → Connect assets → the ad account.
  • The app must be Live, not Development. "Ads creative post was created by an app that is in development mode". Publishing needs a Privacy Policy URL and a Category, then Publish. Development mode blocks creative creation only — the rest of the API works, so this fails late.

Expiry: prefer Never for a system-user token you control. A time-boxed token lapses silently and takes the integration with it.


3. Special Ad Category (Employment, Housing, Credit)

Employment strips the targeting you would normally rely on:

  • no age or gender targeting — Meta forces 18–65, all genders
  • no detailed interest or behaviour targeting
  • minimum 15-mile radius on location targeting
  • no earnings claims anywhere — "$2k/week", "/hr", "$X per job" are rejection risk even when true

Consequence: the creative IS the targeting. With no interest targeting, the only thing making the right person recognise themselves is the ad itself. Put the audience identifier in the image as literal words — SAVANNAH DIESEL MECHANICS — not a clever hook.

Guard the money rule in code, in every place copy can be edited, and fail loudly:

const MONEY = /\$\s?\d|\b\d+\s?(k|dollars|usd)\b|\bper hour\b|\/hr\b/i;

Avoid "now hiring" for contractor work — it pulls W2 job seekers who click, fail qualification, and cost money on the way through.


4. Creative: the crop-safe zone

A 1080×1920 asset is cropped for feed placements. 4:5 removes ~285px from each end; 1:1 removes ~420px. Anything near the top or bottom is destroyed in exactly the placement where most impressions land.

Keep every critical element inside the 1:1 safe band: y 420 → 1500. Stack the identifier, caption and CTA as one block centred in that band, so the whole message survives any crop.

Verify by simulating the crops rather than trusting the full-size render:

for (const h of [1350, 1080]) {
  await sharp(file).extract({ left: 0, top: (1920 - h) / 2, width: 1080, height: h })
    .toFile(`crop_${h}.jpg`);
}

Then look at the ad preview in Ads Manager, which renders each placement for real. That is what caught the cropped identifier.

Native caption look: IG/TikTok put a rounded box behind each individual line, not one flat band — a single band reads as a slide. Heavy bold-italic in a system sans, not a brand face. No fake pla

阅读完整来源 ↗