Twitter/X Integration
Full Twitter/X integration including live streaming, tweets, interactions, and Spaces support.
Overview
FaustBot's Twitter/X integration provides access to live streaming and social features:
Live Streaming
Stream directly to X with chat and engagement tracking.
Tweet Automation
Post tweets, threads, and media automatically from your streams.
Spaces Integration
Connect to X Spaces for audio streaming events.
Engagement Tracking
Track likes, retweets, replies, and new followers in real-time.
Connecting Your Account
Open Twitter/X Settings
Click Twitter/X in the sidebar to open the integration page.
Connect Your Account
Click Connect Account and authorize FaustBot to access your Twitter/X account. This grants permissions for posting and reading your timeline.
Configure Permissions
Select which permissions to enable: tweeting, reading DMs, or accessing Spaces. You can modify these later in settings.
API Access
Some features require Twitter/X API access. If you have a developer account, you can enter your API keys for enhanced functionality.
Available Triggers
FaustBot can respond to Twitter/X events in real-time:
Live Stream Events
Live Comment Comment on your live streamStream Started Live stream went onlineStream Ended Live stream endedViewer Joined New viewer joined the streamTweet Events
Mention Someone mentioned you in a tweetReply Reply to one of your tweetsQuote Tweet Someone quoted your tweetEngagement Events
Like Someone liked your tweetRetweet Someone retweeted your postFollow New followerUnfollow Someone unfollowed youSpaces Events
Space Started Your Space went liveSpace Ended Your Space endedSpeaker Request User requested to speakListener Joined New listener joined the SpaceEffects
Actions can use these Twitter/X-specific effects:
Send Tweet
Post a tweet with text and optional media.
Reply to Tweet
Reply to a specific tweet.
Quote Tweet
Quote a tweet with your commentary.
Retweet
Retweet a post.
Like Tweet
Like a specific tweet.
Send DM
Send a direct message to a user.
Follow User
Follow a Twitter/X user.
Block User
Block a user from your account.
Create Thread
Post a multi-tweet thread.
Delete Tweet
Delete one of your tweets.
Variables
The following variables are available in Twitter/X triggers:
| Variable | Description |
|---|---|
%user% | Twitter handle (without @) |
%displayName% | Display name |
%userId% | Twitter/X user ID |
%message% | Tweet or comment text |
%tweetId% | Unique tweet ID |
%tweetUrl% | URL to the tweet |
%isVerified% | Whether user is verified |
%followerCount% | User's follower count |
%likeCount% | Number of likes on tweet |
%retweetCount% | Number of retweets |
%viewers% | Live stream viewer count |
%spaceTitle% | Title of the Space |
Scripting API
Access Twitter/X features from your scripts via the CPH API:
Tweets
# Send a tweet
CPH.TwitterSendTweet("Going live now! Come hang out!")
# Send a tweet with image
CPH.TwitterSendTweet("Check this out!", imagePath="/path/to/image.png")
# Reply to a tweet
CPH.TwitterReply(args["tweetId"], "Thanks for the mention!")
# Quote tweet
CPH.TwitterQuoteTweet(args["tweetId"], "This is amazing!")Engagement
# Like a tweet
CPH.TwitterLike(args["tweetId"])
# Retweet
CPH.TwitterRetweet(args["tweetId"])
# Follow a user
CPH.TwitterFollow(args["userId"])
# Unfollow a user
CPH.TwitterUnfollow(args["userId"])Moderation
# Block a user
CPH.TwitterBlockUser(args["userId"])
# Unblock a user
CPH.TwitterUnblockUser(args["userId"])
# Mute a user
CPH.TwitterMuteUser(args["userId"])User Info
# Get user info
user = CPH.TwitterGetUserInfo("username")
print(f"Display Name: {user.DisplayName}")
print(f"Followers: {user.FollowerCount}")
print(f"Verified: {user.IsVerified}")See the full API reference for all available methods.