Platforms
Publishing photos, carousels, Reels, and Stories to Instagram.
Instagram uses a two-step container publishing flow. OwlStack handles this automatically on the server.
Connect
Connect Instagram in the OwlStack dashboard:
- Go to Project Settings > Platforms > Instagram
- Click Connect with Instagram
- Authorize via Facebook Business (Instagram requires a Facebook Business account)
- Select the Instagram Business account to connect
Publishing
use OwlStack\Enums\Platform;
$result = $client->publish($post, [Platform::Instagram]);Options
| Option | Type | Description |
|---|---|---|
media_type | string | IMAGE, REELS, or STORIES |
location_id | string | Facebook location ID |
alt_text | string | Alt text for accessibility |
// Single image
$post = Post::create('Check out this photo!')
->withMedia(Media::image('/path/to/photo.jpg'));
$result = $client->publish($post, [Platform::Instagram], [
'alt_text' => 'Photo description',
]);
// Carousel
$post = Post::create('My gallery')
->withMediaCollection(new MediaCollection([
Media::image('/path/to/1.jpg'),
Media::image('/path/to/2.jpg'),
]));
$result = $client->publish($post, [Platform::Instagram]);Media uploads
OwlStack uploads your media to the server before publishing to Instagram. You don't need to host images at publicly accessible URLs.
Constraints
| Constraint | Value |
|---|---|
| Max text length | 2,200 characters |
| Max media (carousel) | 10 |
| Supported media types | JPEG, MP4 |