Skip to content
Quiet Social

Installation and configuration

This documentation is translated from French. Should the two versions differ, the French version prevails.

The package is installed with Composer along with the PHP SDK, creates its table through a migration, and is configured through QUIET_SOCIAL_* environment variables: an API key, a brand, and a few synchronisation settings.

Requirements

  • PHP 8.2 or later, and Laravel 12 or 13 (Laravel 13 itself requires PHP 8.3). Laravel 11 is no longer supported: no release of it is free of known security advisories.
  • The PHP SDK quiet-social/php-social, installed with the package.
  • A cache store that supports locks and is shared by every process that saves models or runs the queue: Redis, Memcached or the database store. See Automatic synchronisation.
  • A queue, recommended in production.
  • A Quiet Social workspace and an API key.

Installing

composer require quiet-social/laravel-social
php artisan migrate

The service provider is discovered automatically. Its migrations create the social_publication_links table, where the package remembers what it sent for each model. To change the defaults, publish the configuration:

php artisan vendor:publish --tag=social-config

Does the model already have rows? Read Adopting the package on an existing database before deploying.

Creating a key

Keys are created in the panel, on the Clés API (API keys) page, by the owner or an administrator of the workspace. The steps are described in the guide. The secret is shown only once:

QUIET_SOCIAL_CLIENT_ID=qsc_a1b2c3d4e5f6g7h8i9j0k1l2
QUIET_SOCIAL_CLIENT_SECRET=qss_...
QUIET_SOCIAL_BRAND_ID=brd_...
QUIET_SOCIAL_WEBHOOK_SECRET=whsec_...

QUIET_SOCIAL_BRAND_ID is needed when the key covers a whole workspace: the API must then be told which brand to publish for. A key restricted to one brand does not need it.

The rights the key needs

What the package does Rights
Send a post publications:create, and media:create when the post has a cover
Resolve network names, find the networks a model declares destinations:read
Read the status of a post before replacing it, find an attempt again publications:read
Cancel a post that has not left publications:cancel

The manual builder needs the same rights, plus media:read for an image given by its med_… identifier. brands:read is not used by the package. Each right is described in the API scopes.

Every configuration key

Every variable is read as env('X') ?: default: a variable present but left empty in .env falls back to its default.

Key Variable Default Meaning
url QUIET_SOCIAL_URL https://quietsocial.dev/api/v1 The API address, version included.
panel_url QUIET_SOCIAL_PANEL_URL https://quietsocial.dev The panel, where a social account is reconnected.
client_id QUIET_SOCIAL_CLIENT_ID none The qsc_… identifier of the key.
client_secret QUIET_SOCIAL_CLIENT_SECRET none Its qss_… secret. Missing credentials surface as AuthenticationFailed on the first call.
brand_id QUIET_SOCIAL_BRAND_ID null The default brd_… brand.
sync QUIET_SOCIAL_SYNC_ENABLED true The automatic synchronisation. false stops it everywhere, jobs already queued included; publishToSocial() still works.
queue.connection QUIET_SOCIAL_QUEUE_CONNECTION null (your default connection) The queue connection of the synchronisation jobs.
queue.name QUIET_SOCIAL_QUEUE null (the default queue) Their queue.
lock_wait QUIET_SOCIAL_LOCK_WAIT 10 Seconds a synchronisation waits for the lock of its model before it is put back in the queue.
ignore_older_than QUIET_SOCIAL_IGNORE_OLDER_THAN 1440 Minutes. A model whose publication date is older is not sent automatically. 0 turns the limit off.
destinations_ttl QUIET_SOCIAL_DESTINATIONS_TTL 300 Seconds the destinations able to publish are cached, for models that do not name their networks. 0 reads them every time.
cover_disk QUIET_SOCIAL_COVER_DISK null (your default disk) The disk a relative cover path is read from.
cover_roots none [storage_path('app/public'), public_path()] The only directories an absolute cover path may be read from. A relative entry is read from base_path().
cover_max_bytes QUIET_SOCIAL_COVER_MAX_BYTES 20971520 (20 MiB) The largest cover read. 0 or less is ignored.
allow_private_network_images QUIET_SOCIAL_ALLOW_PRIVATE_NETWORK_IMAGES false Lets a cover URL point to a private or local address. For a development machine only.
webhook_secret QUIET_SOCIAL_WEBHOOK_SECRET null The whsec_… signing secret. Without it, the webhook route does not exist.
webhook_path QUIET_SOCIAL_WEBHOOK_PATH social/webhook The path of the webhook route.
webhook_tolerance QUIET_SOCIAL_WEBHOOK_TOLERANCE 300 Seconds a signature stays valid.
webhook_replay_window QUIET_SOCIAL_WEBHOOK_REPLAY_WINDOW 43200 (12 h) Seconds a delivery already handled is remembered. 0 turns the recognition of retries off.
connect_timeout QUIET_SOCIAL_CONNECT_TIMEOUT 5 Seconds to connect to the API.
timeout QUIET_SOCIAL_TIMEOUT 20 Seconds for a whole call.