Skip to content

feat(cli): add threads oauth registration guide#753

Merged
ralyodio merged 2 commits into
profullstack:masterfrom
mohammed054:add-threads-oauth-guide
Jun 18, 2026
Merged

feat(cli): add threads oauth registration guide#753
ralyodio merged 2 commits into
profullstack:masterfrom
mohammed054:add-threads-oauth-guide

Conversation

@mohammed054

Copy link
Copy Markdown
Contributor

This PR adds the missing OAuth registration guide for Threads (Meta) to the \promote social register\ command. This resolves #403.

@greptile-apps

greptile-apps Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds the missing OAuth registration guide for the Threads (Meta) platform to the OAUTH_REGISTRATION_GUIDES array in promote.ts, resolving issue #403. It follows the established pattern used by other platforms (Instagram, TikTok, etc.) and correctly instructs users to create a Business-type Meta app, which is required for the Threads API product to appear.

  • Adds a new threads entry to OAUTH_REGISTRATION_GUIDES with correct scopes (threads_basic, threads_content_publish), redirect URIs, and a 6-step setup guide.
  • Correctly specifies \"Business\" as the required app type in step 2, which is the only app type that can access the Threads API product.

Confidence Score: 5/5

Safe to merge — adds a new static data entry with no runtime logic changes and correctly addresses the app type requirement.

The change is limited to inserting a new static configuration object. The scopes (threads_basic, threads_content_publish) are the correct Threads API scope identifiers, the redirect URIs mirror every other platform entry, and the guide steps now correctly instruct users to select the Business app type — the only type compatible with the Threads API product.

No files require special attention.

Important Files Changed

Filename Overview
packages/cli/src/commands/promote.ts Adds a new Threads (Meta) OAuth registration guide entry; structure and scopes are consistent with existing platform entries, and the required Business app type is correctly specified.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant User
    participant CLI as sh1pt CLI
    participant Meta as Meta Developer Portal
    participant ThreadsOAuth as Threads OAuth

    User->>CLI: sh1pt social register threads
    CLI->>User: Display Threads OAuth Registration Guide
    Note over User,Meta: One-time setup (manual)
    User->>Meta: Create Business app
    User->>Meta: Add Threads API product
    User->>Meta: "Configure redirect URIs & permissions"
    User->>Meta: Copy App ID + App Secret
    User->>CLI: Enter App ID + App Secret
    CLI->>User: Save credentials locally
    Note over User,ThreadsOAuth: Per-session OAuth flow
    User->>CLI: sh1pt promote --platform threads
    CLI->>ThreadsOAuth: Redirect to OAuth authorization URL
    ThreadsOAuth->>User: "Login & grant permissions"
    ThreadsOAuth->>CLI: Callback with auth code
    CLI->>ThreadsOAuth: Exchange code for access token
    CLI->>User: Authenticated, ready to promote
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant User
    participant CLI as sh1pt CLI
    participant Meta as Meta Developer Portal
    participant ThreadsOAuth as Threads OAuth

    User->>CLI: sh1pt social register threads
    CLI->>User: Display Threads OAuth Registration Guide
    Note over User,Meta: One-time setup (manual)
    User->>Meta: Create Business app
    User->>Meta: Add Threads API product
    User->>Meta: "Configure redirect URIs & permissions"
    User->>Meta: Copy App ID + App Secret
    User->>CLI: Enter App ID + App Secret
    CLI->>User: Save credentials locally
    Note over User,ThreadsOAuth: Per-session OAuth flow
    User->>CLI: sh1pt promote --platform threads
    CLI->>ThreadsOAuth: Redirect to OAuth authorization URL
    ThreadsOAuth->>User: "Login & grant permissions"
    ThreadsOAuth->>CLI: Callback with auth code
    CLI->>ThreadsOAuth: Exchange code for access token
    CLI->>User: Authenticated, ready to promote
Loading

Reviews (2): Last reviewed commit: "fix(cli): specify business app type for ..." | Re-trigger Greptile

Comment thread packages/cli/src/commands/promote.ts Outdated
platform: 'threads',
label: 'Threads (Meta)',
url: 'https://developers.facebook.com/apps/',
docUrl: 'https://developers.facebook.com/docs/threads',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The docUrl points to the root path which may or may not redirect, while the stable canonical documentation entry point is the /overview/ sub-path. Using the more specific URL ensures users land on useful content even if the root redirect ever changes.

Suggested change
docUrl: 'https://developers.facebook.com/docs/threads',
docUrl: 'https://developers.facebook.com/docs/threads/overview/',

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@ralyodio ralyodio merged commit a353458 into profullstack:master Jun 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need PRs for these social media networks to setup an oauth app on the platforms

2 participants