meta-threads-oauth-lifecycle
Skill0 starsChanged 18 days agoMITView on GitHub
Use when configuring Meta Threads OAuth and token refresh.
In this repository86 other files it gives its agents.
- ai-assistant-editor-setupSkill
- api-and-interface-designSkill
- banner-designSkill
- brainstormingSkill
- caveman-exploreSkill
- caveman-reviewSkill
- chat-silence-diagnosisSkill
- ci-cd-and-automationSkill
- code-auditSkill
- codebase-designSkill
- koordinator-team-dispatchSkill
- constraint-driven-developmentSkill
- context-engineeringSkill
- cpanel-shared-hosting-deploySkill
- cross-profile-cron-opsSkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- domain-modelingSkill
- doubt-driven-developmentSkill
- finishing-a-development-branchSkill
- frontend-designSkill
- git-workflow-and-versioningSkill
- graphic-design-laneSkill
- hermes-gateway-web-uiSkill
- hermes-profile-hygieneSkill
- hermes-profile-provisioningSkill
- hermes-service-persistenceSkill
- hermes-stream-stale-diagnosisSkill
- hermes-team-dashboardSkill
- idea-refineSkill
- incremental-implementationSkill
- indonesian-official-lettersSkill
- internal-commsSkill
- interview-meSkill
- investigate-firstSkill
- kanban-rate-limit-resilienceSkill
- karpathy-guidelinesSkill
- large-project-gated-deliverySkill
- lean-buildSkill
- live-agent-office-operationsSkill
- live-react-runtime-qaSkill
- live-web-release-verificationSkill
- markdown-pdf-pipelineSkill
- marketing-strategySkill
- meta-social-publishingSkill
- migrationSkill
- multi-profile-project-orchestrationSkill
- network-operationsSkill
- observability-and-instrumentationSkill
- office-skill-distributionSkill
- organization-site-menu-researchSkill
- performance-optimizationSkill
- php-upload-size-limitsSkill
- planning-and-task-breakdownSkill
- ponytail-auditSkill
- ponytail-debtSkill
- ponytail-reviewSkill
- ponytailSkill
- portable-app-handoffSkill
- receiving-code-reviewSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Use whenever a task involves the Threads Graph API/OAuth (connect account, fix permission errors, refresh/rotate tokens, debug …
- Very specific: line 37
DELETE post → cek me/threads kosong).
- Very specific: line 61
Delete post perlu threads_delete.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Meta / Threads API — OAuth Lifecycle & Secure Handoff
Kelas kerja: menghubungkan kantor ke API Meta (khususnya Threads) untuk publishing otomatis. Skill ini khusus OAuth app + token API.
When to Use
Use whenever a task involves the Threads Graph API/OAuth (connect account, fix permission errors, refresh/rotate tokens, debug publish/delete failures).
Urutan kerja yang terbukti (Threads API)
- Buat app dengan use case Threads API.
- Permissions & features: klik Add pada
threads_content_publishdanthreads_delete(kalau butuh rollback) sampai status Ready for testing. Status dashboard ≠ izin di token. - Settings → Basic → isi dan simpan Redirect Callback URL sebelum OAuth flow.
- App Secret (Settings → Basic → Show) diserahkan ke server via endpoint gated, TIDAK PERNAH lewat chat.
- OAuth authorize → Approve → server tukar
codeke short-lived, laluth_exchange_tokenuntuk long-lived 60 hari. - Refresh otomatis:
GET /refresh_access_token?grant_type=th_refresh_token&access_token=<token>— token harus ≥24 jam, jadi cron guard harus skip bila lebih muda. - Verifikasi izin nyata dengan tes publish (create container → publish →
DELETE post → cek
me/threadskosong).
Pola handoff kredensial aman
- Endpoint gated di Apache conf terpisah, bukan vhost utama. Untuk vhost dengan
ProxyPass /catch-all, kecualikan route via scoped<Location> ProxyPass !. - Gate acak 32-char di
.gate(640 root:www-data); pakai query?k=karena browser form tidak bisa mengirim Authorization header. - PHP form POST simpan rahasia atomik (file 600), tidak pernah mengembalikan nilainya. Callback terpisah menukar code dan menampilkan hanya akun/scope/ expiry, bukan token.
- Setelah selesai: disable conf, hapus endpoint/gate/secret, verifikasi tak ada secret tersisa dan probe publik tidak lagi mencapai endpoint.
Pitfalls terbukti
- User Token Generator tidak memberi izin custom; scopes yang ditambah di app perlu alur OAuth eksplisit.
- Panjang token bukan bukti scopes. Bukti = API nyata (mis. DELETE success).
debug_tokenhostnyagraph.facebook.com, bukangraph.threads.com.- PHP Apache bisa tidak punya curl extension: cek sebelum callback; bila hilang, pasang paket PHP curl yang cocok dan reload Apache.
- Refresh GET-only; POST menghasilkan error 33.
- Token <24 jam tidak dapat refresh (error 452/4279019).
- Delete post perlu
threads_delete; error code 10 berarti scope tidak ada pada token aktual. hermes cron create --scriptmenerima basename relatif ke profile scripts, bukan path absolut.
Batasan platform
- Post maks 500 karakter; container 24 jam; 250 post/hari; edit tidak tersedia.
Koreksi post = DELETE + repost (perlu
threads_delete). - Long-lived token 60 hari; tanpa refresh tepat waktu token expired dan harus OAuth ulang. Pasang cron refresh sebelum mengandalkan token produksi.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

