jxx0410 / bundlesocial-php
PHP SDK for overseas social media API
1.0.1
2026-03-28 12:37 UTC
Requires
- php: >=7.4
- ext-fileinfo: *
- ext-json: *
- guzzlehttp/guzzle: ^6.2 || ^7.0
- monolog/monolog: ^1.22 || ^2.0 || ^3.0
- pimple/pimple: ^3.0
- psr/simple-cache: ^1.0 || ^2.0 || ^3.0
- symfony/cache: ^3.3 || ^4.3 || ^5.0 || ^6.0
- symfony/event-dispatcher: ^4.3 || ^5.0 || ^6.0
- symfony/http-foundation: ^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5.0
- giorgiosironi/eris: ^0.14
- mockery/mockery: ^1.2.3
- phpunit/phpunit: ^9.3
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.
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
| Service | Accessor | Description |
|---|---|---|
| Post | $app->post | Create, update, delete, list, retry posts |
| Upload | $app->upload | Upload files, streams, URLs; large file support |
| Team | $app->team | CRUD teams |
| Analytics | $app->analytics | Post/account analytics, bulk queries, raw data |
| Comment | $app->comment | CRUD comments |
| Social Account | $app->socialAccount | Connect, disconnect, portal links, channel management |
| Organization | $app->organization | Org info, posts/uploads/imports usage |
| Webhook | $app->webhook | Signature verification, event construction |
| Misc | $app->misc | Platform-specific operations (YouTube, LinkedIn, Reddit, etc.) |
| Post Import | $app->postImport | Import post history from platforms |
Supported Platforms
Instagram, YouTube, TikTok, Facebook, Twitter/X, LinkedIn, Reddit, Pinterest, Mastodon, Bluesky, Discord, Slack, Google Business, Threads
Documentation
- Quick Start Guide -- Get running in minutes
- API Reference -- Complete method reference
- Hyperf Integration -- Use with Hyperf framework
Error Handling
The SDK throws typed exceptions for HTTP errors:
| Exception | Status | Description |
|---|---|---|
BadRequestException | 400 | Invalid parameters |
UnauthorizedException | 401 | Invalid/missing API key |
ForbiddenException | 403 | Insufficient permissions |
NotFoundException | 404 | Resource not found |
RateLimitException | 429 | Rate limit exceeded |
ServerException | 5xx | Server error |
NetworkException | -- | Connection failure |
InvalidSignatureException | -- | Bad webhook signature |
Testing
composer test
composer test-unit
composer test-coverage
License
MIT