FoPost LogoFoPost Docs
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:

  1. Go to Project Settings > Platforms > Twitter/X
  2. Click Connect with Twitter
  3. Authorize OwlStack via OAuth
  4. Your account appears as connected

Publishing

use OwlStack\Enums\Platform;

$result = $client->publish($post, [Platform::Twitter]);

Options

OptionTypeDescription
reply_tostringTweet ID to reply to
quote_tweet_idstringTweet ID to quote
threadboolCreate a thread from long content
pollarrayPoll 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

ConstraintValue
Max text length280 characters
Max media4
Supported media typesJPEG, PNG, GIF, MP4

On this page