jxx0410/bundlesocial-php

PHP SDK for overseas social media API

Maintainers

Package info

gitee.com/lix0410/overseas-bundle-social-sdk.git

pkg:composer/jxx0410/bundlesocial-php

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

1.0.1 2026-03-28 12:37 UTC

This package is not auto-updated.

Last update: 2026-03-28 12:43:33 UTC


README

PHP SDK for OverseasSocial API -- post to 14+ social platforms, manage uploads, teams, analytics, and more.

English | 简体中文

Requirements

  • PHP >= 7.4
  • ext-fileinfo, ext-json

Installation

composer require jxx0410/bundlesocial-php

Quick Start

use Jxx0410\BundleSocial\OverseasSocial\Application;

$app = new Application([
    'api_key'  => 'YOUR_API_KEY',
    'base_uri' => 'YOUR_BASE_URI',
]);

// Upload → Post workflow
$upload = $app->upload->create('/path/to/image.jpg', 'team_xxx');

$post = $app->post->create([
    'teamId' => 'team_xxx',
    'title'  => 'Hello World',
    'status' => 'SCHEDULED',
    'postDate' => '2026-06-01T12:00:00Z',
    'socialAccountTypes' => ['INSTAGRAM', 'YOUTUBE'],
    'data' => [
        'INSTAGRAM' => [
            'text' => 'Hello from SDK!',
            'type' => 'POST',
            'uploadIds' => [$upload['id']],
        ],
    ],
]);

Services

ServiceAccessorDescription
Post$app->postCreate, update, delete, list, retry posts
Upload$app->uploadUpload files, streams, URLs; large file support
Team$app->teamCRUD teams
Analytics$app->analyticsPost/account analytics, bulk queries, raw data
Comment$app->commentCRUD comments
Social Account$app->socialAccountConnect, disconnect, portal links, channel management
Organization$app->organizationOrg info, posts/uploads/imports usage
Webhook$app->webhookSignature verification, event construction
Misc$app->miscPlatform-specific operations (YouTube, LinkedIn, Reddit, etc.)
Post Import$app->postImportImport post history from platforms

Supported Platforms

Instagram, YouTube, TikTok, Facebook, Twitter/X, LinkedIn, Reddit, Pinterest, Mastodon, Bluesky, Discord, Slack, Google Business, Threads

Documentation

Error Handling

The SDK throws typed exceptions for HTTP errors:

ExceptionStatusDescription
BadRequestException400Invalid parameters
UnauthorizedException401Invalid/missing API key
ForbiddenException403Insufficient permissions
NotFoundException404Resource not found
RateLimitException429Rate limit exceeded
ServerException5xxServer error
NetworkException--Connection failure
InvalidSignatureException--Bad webhook signature

Testing

composer test
composer test-unit
composer test-coverage

License

MIT