Getting Started (Developers)
Quick Start (WordPress)
Set up FoPost in a WordPress site.
Quick Start - WordPress
This guide gets OwlStack working in your WordPress site.
1. Install
Download the plugin from the OwlStack dashboard and upload it, or install via Composer:
cd wp-content/plugins/owlstack-wordpress
composer install2. Activate
Go to WP Admin > Plugins and activate OwlStack.
3. Configure
Navigate to WP Admin > OwlStack > Settings and:
- Enter your OwlStack API key (get one from app.owlstack.app)
- Your connected platforms will appear automatically based on what you've set up in the OwlStack dashboard
Platform connections
Platform connections (OAuth) are managed in the OwlStack dashboard, not in WordPress. The plugin reads your connected platforms via the API key.
4. Publish from the editor
When editing a post, you'll see the OwlStack meta box in the sidebar. Select your target platforms and hit Publish - the post will be automatically published to all selected platforms.
5. Publish from code
// Publish to Telegram
owlstack()->publish('Hello from WordPress!', ['telegram']);
// Publish to multiple platforms
owlstack()->publish('Hello from WordPress!', [
'telegram',
'twitter',
'linkedin',
]);
// Publish a Post object
$post = \OwlStack\Post::create('My Post')
->withUrl('https://example.com/my-post')
->withHashtags(['wordpress']);
owlstack()->publishPost($post, ['telegram', 'twitter']);6. Hooks
Actions
// After successful publishing
add_action('owlstack_post_published', function ($result) {
error_log("Published to {$result->platform()->value}");
});
// After a failure
add_action('owlstack_post_failed', function ($result) {
error_log("Failed: {$result->error()}");
});Filters
// Control which post types show the meta box
add_filter('owlstack_supported_post_types', function ($types) {
return ['post', 'page', 'product'];
});
// Modify the Post object before publishing
add_filter('owlstack_post_data', function ($post) {
return $post;
});Next steps
- WordPress Admin Panel - Settings page walkthrough
- WordPress Hooks - Full hooks reference
- WordPress REST API - REST endpoints