Platforms
Twitter / X
Publishing tweets via FoPost.
Twitter / X
OwlStack supports Twitter API v2, including polls, quote tweets, threads, and automatic t.co URL handling.
Connect
Connect Twitter in the OwlStack dashboard:
- Go to Project Settings > Platforms > Twitter/X
- Click Connect with Twitter
- Authorize OwlStack via OAuth
- Your account appears as connected
Publishing
use OwlStack\Enums\Platform;
$result = $client->publish($post, [Platform::Twitter]);Options
| Option | Type | Description |
|---|---|---|
reply_to | string | Tweet ID to reply to |
quote_tweet_id | string | Tweet ID to quote |
thread | bool | Create a thread from long content |
poll | array | Poll options and duration |
// Reply to a tweet
$result = $client->publish($post, [Platform::Twitter], [
'reply_to' => '1234567890',
]);
// Quote tweet
$result = $client->publish($post, [Platform::Twitter], [
'quote_tweet_id' => '9876543210',
]);
// Create a poll
$result = $client->publish($post, [Platform::Twitter], [
'poll' => [
'options' => ['Yes', 'No', 'Maybe'],
'duration_minutes' => 1440,
],
]);URL handling
Twitter automatically wraps URLs to 23 characters (t.co). OwlStack accounts for this in the 280-character budget, so you don't need to worry about URL length.
Constraints
| Constraint | Value |
|---|---|
| Max text length | 280 characters |
| Max media | 4 |
| Supported media types | JPEG, PNG, GIF, MP4 |