project creatortrack social platforms expansion 20260715T161854


name: CreatorTrack social platforms expansion: Meta live, TikTok app staged description: Update to existing project memory: Meta (FB+IG) app configured, M1 shipped with fix; TikTok app created with concrete portal config + rate limits type: project


Supersedes prior state in this file (which said the blocker was purely a missing secrets file). As of 2026-07-15:

Meta (Facebook + Instagram): live and tested. ~/.forge-secrets/creatortrack-social.env exists; syncSocial(ws=85) returns real numbers (IG 704k followers, FB 323k). M1 (seed + live test) passed code review with one should-fix: the seed script stored a PAGE token in the instagram row's access_token field, which would have been silently mangled by the USER-token refresh logic once a Meta dev app got wired up. Fixed by tagging system-user connections with credentials.user_token_type === "system_user" so they short-circuit the refresh path (lib/social/oauth.ts). M2 (per-video row backfill for IG/FB, ~499 posts) is in progress; Instagram's Business API caps at 200 req/hour so that backfill is a multi-hour checkpointed grind, Facebook is fast.

TikTok: app created, credentials staged, connect flow already live in prod. Portal reorganized since it was last documented: there is no longer a separate "Display API" product, its scopes (user.info.stats, user.info.profile, video.list) are granted directly under Login Kit, and user.info.basic comes bundled automatically. App name CreatorTrack, redirect URI https://app.creatortrack.ai/api/social/connect/callback, sandbox target user = Gus the Bass TikTok account. Client key/secret validated and stored in the same secrets file. Because prod's social-connect routes predate this branch, TikTok can be connected today at app.creatortrack.ai/gus-the-bass/social, no need to wait for ship. TikTok API rate limit is 600 requests/minute with stats returned inline in the video-list call (no per-video insights round-trip needed), so its backfill will take minutes once connected, unlike Instagram's hours-long crawl. One pre-ship caveat: TikTok rotates its refresh token on every use, and the improved refresh-serialization fix (branch Task 7) isn't on prod yet, so an early connection could occasionally need a manual reconnect until this branch ships.

Why: keeps the social data layer's actual progress (not the earlier 'blocked on credentials' snapshot) accurate for whoever picks up Phase 2 / the cross-post matcher next.

How to apply: don't re-propose TikTok Developer Portal steps, this config is done. Check comms/results/creatortrack-social-meta-ingest-m1.md and the branch's Meta-lane ledger for M2/M3 status before restarting that work.

[auto-memory session 60d132de-4659-485c-8044-427af0ccce7f, confidence 0.75, mode staged]