Publishing & scheduling
Use the same fluent builder for one account, many accounts, immediate publishing, durable scheduling, or queued execution.
Immediate publishing
SocialMedia::post()
->content('A new release is live.')
->platforms(['facebook', 'twitter'])
->publish();
Target exact accounts
SocialMedia::post()
->content('Only these connected destinations')
->platforms(['facebook'])
->accounts([
'facebook' => [12, 19],
])
->publish();
Schedule for later
SocialMedia::post()
->content('Publish tomorrow morning')
->platform('linkedin')
->scheduleFor(now()->addDay()->setTime(9, 0))
->publish();
The record is stored as pending. LaraPost's scheduler claims due rows before publishing so concurrent scheduler runs do not publish the same pending row twice.
Queue immediate work
SocialMedia::post()
->content('Process this through Laravel queues')
->platform('facebook')
->queue();
The post is persisted first, then dispatched as a unique job. Future scheduled posts wait for the scheduler instead of being pushed early.
Retries
Scheduled failures use configured retry attempts and backoff. Failed terminal attempts remain visible in publishing history with the provider error message.
'retry' => [
'max_attempts' => 3,
'backoff_minutes' => [1, 5, 15],
],
Token refresh
OAuth callback responses are normalized with expiry timestamps where providers expose them. Before publishing, LaraPost refreshes credentials that are close to expiry when the driver supports refresh.
Media validation
Local files are validated against configured file sizes and extensions before provider dispatch. URL-based provider flows, such as TikTok pull-from-URL, are validated by the driver against the provider's URL requirements.