feat(twitter): add extended Twitter/X operations: posting, DMs, engagement#47
Closed
Charlsz wants to merge 6 commits into
Closed
feat(twitter): add extended Twitter/X operations: posting, DMs, engagement#47Charlsz wants to merge 6 commits into
Charlsz wants to merge 6 commits into
Conversation
- Introduced Discord Bot and Webhook credentials in NodeCredentials. - Added new nodes for sending messages, sending webhooks, and creating threads in Discord. - Implemented input and output schemas for Discord message and webhook nodes. - Created utility functions for handling Discord API interactions with retries. - Added tests for Discord nodes and credentials using Vitest. - Updated package.json to include Vitest for testing.
…d API support - Updated environment variable mappings for Twitter credentials to include access tokens, consumer keys, and secrets. - Introduced new OAuth 2.0 credential definition for Twitter with PKCE support. - Implemented Twitter client for handling OAuth 1.0a signature generation and API requests. - Added nodes for creating, deleting, liking, and retweeting tweets, as well as sending direct messages and searching tweets. - Created tests for the new Twitter integration features to ensure functionality and reliability. - Added a smoke test script to verify Twitter credentials and basic API interactions.
Contributor
|
Merged in commit bf33d7a. Thank you for the extended Twitter/X operations with OAuth 1.0a support! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#22
Adds 7 new Twitter/X operation nodes, an OAuth2 PKCE credential definition, Zod schemas for all inputs/outputs, and unit tests. Also adds OAuth 1.0a (HMAC-SHA1) signing so write operations (tweet, like, retweet, DM) work with consumer key + access token credentials.
I built a complete Twitter/X integration layer on top of the existing
twitter-monitornode. The codebase now supports the full lifecycle of Twitter interactions — reading tweets, posting content, engaging with tweets (likes, retweets), sending direct messages, and looking up user profiles. All of this is backed by a sharedtwitter-client.tsthat handles authentication, retries, and error handling in one place.The biggest technical addition beyond the 7 nodes themselves is OAuth 1.0a support. Twitter's API v2 requires user-context authentication for any write operation (posting, liking, retweeting, DMs). The original codebase only had Bearer token auth, which is read-only. I implemented full HMAC-SHA1 signature generation following RFC 5849 directly in the client — no external OAuth libraries needed. When all four OAuth 1.0a credentials are present (consumer key, consumer secret, access token, access token secret), the client signs requests automatically. If they're missing, it falls back to Bearer token auth for read-only operations. This means existing read-only workflows won't break.
I also wired everything through the full stack: the core
NodeCredentialstype, the CLI playground (env-provider, credential prompts, run command), and the web playground (credential UI, node registry). A user can set their Twitter credentials via the.envfile, the CLIjam credentials set twittercommand, or the web UI — all three paths work.Important notes
402 CreditsDepletederror, it's not a code issue — your developer account has used its monthly quota. Check your usage at https://developer.twitter.com/en/portal/dashboard.consumerKey,consumerSecret,accessToken,accessTokenSecret. These come from the "Keys and Tokens" tab in your Twitter Developer Portal app.cryptomodule (createHmac,randomBytes). No new packages were added topackage.json.test-twitter.tsfile at the repo root is a manual smoke test for verifying live credentials. It's not part of the automated test suite and can be removed before merging if preferred.New operations
twitterCreateTweettwitterDeleteTweettwitterLikeTweettwitterRetweettwitterSearchTweetstwitterSendDMtwitterGetUserByUsernameEnvironment variables