Meta rejects the whole ad creative with error 200/1815199 when the ad
account isn't authorized (in Business Manager) to use the Instagram
account linked to the chosen page. Picking a different page in the new
selector doesn't help if that page's IG is also unshared. Now, when the
creative fails for that specific reason, we retry without
instagram_actor_id so the ad still publishes on Facebook, and the modal
explains why Instagram was dropped and how to enable it.
createFullCampaign gets the same fallback for free.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Some ad accounts aren't authorized to use the Instagram account that's
auto-detected from the existing ad set, causing Meta error 200/1815199
on publish. The new selector lists all of the user's connected Pages
(with linked Instagram accounts) so they can choose a valid combination
themselves, falling back to the auto-detected default. Also paginate
/me/accounts so accounts beyond the first page show up.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
A geracao de copy/imagem por IA exigia que o usuario descrevesse o
anuncio do zero. Agora getAdSetDefaultCreative tambem extrai o texto
do criativo de um anuncio ja existente no ad set (headline, mensagem
e descricao) e o AddAdModal usa isso para preencher automaticamente
o campo de contexto, permitindo gerar variacoes no mesmo tom sem
digitar nada.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adiciona modal "+ Anuncio" na tabela de campanhas que reaproveita o
fluxo de geracao de copy/imagem por IA para publicar novos criativos
no mesmo ad set existente, mantendo orcamento e segmentacao.
- Extrai pipeline de upload+criativo+anuncio (addAdToAdSet) do
createFullCampaign para reuso
- Adiciona get_adset_default_creative para pre-preencher pagina,
link, instagram e CTA com base em anuncio ja existente no ad set
- Novas rotas POST /api/adsets/[id]/ads e
GET /api/adsets/[id]/creative-defaults
- Novo componente AddAdModal com geracao de copy/imagem via IA ou
upload manual
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Full app with AI campaign creation/copy/creative generation, dashboard,
campaign automation engine, Meta OAuth login, and a redesigned landing page.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>