Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
<?php
declare(strict_types=1);
namespace App\Services\Analytics\Collectors\Publications;
use App\Enums\SocialAccount\Platform;
use App\Exceptions\Analytics\AnalyticsCollectionException;
use App\Models\SocialAccount;
class PublicationHistoryCollectorFactory
{
public function supports(Platform $platform): bool
{
return $platform->isIncludedInAnalytics();
}
public function for(SocialAccount $account): AbstractPublicationHistoryCollector
{
return match ($account->platform) {
Platform::Instagram, Platform::InstagramFacebook => app(InstagramPublicationCollector::class),
Platform::Facebook => app(FacebookPublicationCollector::class),
Platform::Threads => app(ThreadsPublicationCollector::class),
Platform::X => app(XPublicationCollector::class),
Platform::Pinterest => app(PinterestPublicationCollector::class),
Platform::YouTube => app(YouTubePublicationCollector::class),
Platform::TikTok => app(TikTokPublicationCollector::class),
Platform::Bluesky => app(BlueskyPublicationCollector::class),
Platform::Mastodon => app(MastodonPublicationCollector::class),
default => throw AnalyticsCollectionException::unsupported("{$account->platform->value} publication history is not supported"),
};
}
}