Social media publishing extension for Data Machine. Enables automated publishing to Twitter/X, Facebook Pages, Bluesky, Threads, and Pinterest.
- WordPress 6.9+
- PHP 8.2+
- Data Machine core plugin (required)
- Install and activate the Data Machine core plugin
- Install this plugin in your WordPress plugins directory
- Activate Data Machine Socials
- Configure authentication for each platform in Data Machine settings
| Platform | Auth Type | Character Limit | Media Support |
|---|---|---|---|
| Twitter/X | OAuth 1.0a | 280 chars | Images |
| Facebook Pages | OAuth 2.0 | No limit | Images |
| Bluesky | App Password | 300 chars | Images |
| Threads | OAuth 2.0 | 500 chars | Images |
| Bearer Token | N/A (pins) | Images required |
Each platform requires authentication setup:
- Go to Data Machine → Settings → Authentication
- Select the platform you want to configure
- Follow the OAuth flow or enter credentials
- Save and verify connection
Twitter/X:
- Requires Twitter Developer account
- Create an app at developer.twitter.com
- Enter API Key and API Secret in settings
- Complete OAuth authorization
Facebook:
- Requires Facebook App with Pages permissions
- Needs
pages_manage_posts,pages_manage_engagementscopes - Authorize your Facebook account
- Select which Page to publish to
Bluesky:
- Generate an App Password in Bluesky settings
- Enter your handle and app password
- No OAuth flow required
Threads:
- Requires Meta app registration
- OAuth 2.0 authentication
threads_basicandthreads_content_publishscopes
Pinterest:
- Requires Pinterest Developer account
- Generate an access token
- Configure default board or use category mapping
Once authenticated, social handlers appear in the Data Machine Pipeline Builder:
- Create or edit a Pipeline
- Add a "Publish" step
- Select the social platform handler
- Configure handler settings:
- Include Images: Enable/disable image uploads
- Link Handling: How to handle source URLs (append, reply, comment, none)
- Save and run your flow
Social handlers register AI tools that can be used in Data Machine Chat:
twitter_publish- Post to Twitter with media supportfacebook_publish- Post to Facebook Pagesbluesky_publish- Post to Blueskythreads_publish- Post to Threadspinterest_publish- Create Pinterest pins
This plugin follows the Data Machine extension pattern:
- Namespace:
DataMachineSocials\Handlers\{Platform} - Registration: Handlers self-register via
HandlerRegistrationTrait - Discovery: Core
HandlerAbilitiesdiscovers handlers via WordPress filters - Auth: Core
AuthAbilitiesmanages OAuth flows and token storage
Each handler registers itself via HandlerRegistrationTrait::registerHandler() with
a meta config array (the trailing array(...) argument). The shape exposed to
clients via GET /datamachine/v1/socials/platforms is:
array(
'charLimit' => 280, // optional int
'maxImages' => 4, // optional int
'aspectRatios' => array( 'any' ), // optional string[]
'defaultAspectRatio' => 'any', // optional string
'supportsCarousel' => false, // optional bool
'supportsVideo' => true, // optional bool
'capabilities' => array( // optional, canonicalised server-side
array( 'slug' => 'publish', 'label' => 'Publish' ),
),
'preview' => array( // optional — see "Preview shape" below
'aspectRatio' => '16:9',
'captionPosition' => 'above',
'previewSurface' => 'feed',
),
)The preview field declares how clients should render a post preview for the
platform. It exists so consumers (e.g. the Studio publish pane) can render
platform-canonical previews without any per-platform branching — the client
renders whatever shape the server declares.
| Field | Values | Meaning |
|---|---|---|
aspectRatio |
1:1, 4:5, 16:9, native |
How images are framed in the preview |
captionPosition |
above, below, overlay |
Where the caption renders relative to media |
previewSurface |
card, feed, square |
Visual chrome around the preview |
Per-platform defaults declared in this plugin:
| Platform | aspectRatio |
captionPosition |
previewSurface |
|---|---|---|---|
| Twitter / X | 16:9 |
above |
feed |
| Bluesky | 16:9 |
above |
feed |
| Threads | native |
below |
feed |
1:1 |
below |
square |
|
native |
above |
card |
|
native |
above |
card |
|
4:5 |
below |
square |
|
native |
above |
card |
Backwards compatibility. preview is optional. Handlers that don't declare
it (or older DM-Socials installs running against newer clients) get a generic
feed-shaped default applied server-side:
array(
'aspectRatio' => 'native',
'captionPosition' => 'above',
'previewSurface' => 'feed',
)The field is always present on the response — clients never have to default it.
data-machine-socials/
├── data-machine-socials.php # Plugin entry point
├── composer.json # Dependencies (twitteroauth)
├── inc/
│ └── Handlers/
│ ├── Twitter/
│ │ ├── Twitter.php # Handler implementation
│ │ ├── TwitterAuth.php # OAuth 1.0a auth
│ │ └── TwitterSettings.php # Handler settings
│ ├── Facebook/
│ │ ├── Facebook.php
│ │ ├── FacebookAuth.php # OAuth 2.0 auth
│ │ └── FacebookSettings.php
│ ├── Bluesky/
│ │ ├── Bluesky.php
│ │ └── BlueskyAuth.php # App password auth
│ ├── Threads/
│ │ ├── Threads.php
│ │ ├── ThreadsAuth.php # OAuth 2.0 auth
│ │ └── ThreadsSettings.php
│ └── Pinterest/
│ ├── Pinterest.php
│ ├── PinterestAuth.php # Bearer token auth
│ └── PinterestSettings.php
└── docs/
└── handlers/
├── twitter.md
├── facebook.md
├── bluesky.md
├── threads.md
└── pinterest.md
abraham/twitteroauth- Twitter OAuth 1.0a client- Data Machine core plugin - Provides base classes and abilities
cd data-machine-socials
composer installThis plugin follows WordPress coding standards and the Data Machine style guide:
- PSR-4 autoloading
- WordPress 6.9+ compatibility
- PHP 8.2+ features
- Proper namespacing and abstraction
GPL v2 or later - See LICENSE
- Issues: GitHub Issues
- Documentation: Data Machine Docs
- Author: Chris Huber (chubes.net)