Use meta for Meta Marketing API and Instagram workflows.
Fail closed: if required inputs are missing or any command fails, stop immediately and surface the error.
Install
go install github.com/bilalbayram/metacli/cmd/meta@latestmeta --helpHuman-required auth bootstrap (must happen first)
APP_ID and APP_SECRET.REDIRECT_URI.cloudflared tunnel --url http://127.0.0.1:53682 (or similar, it must be HTTPS)REDIRECT_URI=https:///oauth/callback meta auth setup --profile --app-id --app-secret --redirect-uri --mode both --scope-pack solo_smb --listen 127.0.0.1:53682 --timeout 180s --open-browser=false auth_url on their own machine, logs in, and grants consent.meta auth validate --profile --min-ttl 72h Common commands
meta schema sync --schema-dir ~/.meta/schema-packsmeta --profile insights accounts list --active-only --output table meta --profile api get act_/campaigns --fields id,name,status --limit 100 --follow-next meta --profile campaign create --account-id --params "name=,objective=OUTCOME_SALES,status=PAUSED" --schema-dir ~/.meta/schema-packs --dry-run meta --profile campaign create --account-id --params "name=,objective=OUTCOME_SALES,status=PAUSED" --schema-dir ~/.meta/schema-packs meta --profile campaign update --campaign-id --params "daily_budget=" --confirm-budget-change meta --profile insights run --account-id --date-preset last_7d --level campaign --metric-pack quality --format jsonl meta --profile ig publish feed --media-url --caption "" --idempotency-key Rules
--output json or --format jsonl) for automation.APP_SECRET, access tokens) when echoing commands/results.共 1 个版本