WordPressPlatform Configuration
Configure Facebook in the FoPost WordPress plugin.
Configure the OwlStack WordPress plugin to publish posts to your Facebook Page.
Prerequisites
You need a Facebook App and a Facebook Page with a long-lived Page Access Token.
Getting Facebook API Credentials
- Go to Meta for Developers
- Create a new app (choose Business type)
- Add the Pages API product
- Get your App ID and App Secret from the app settings
- Generate a Page Access Token using the Graph API Explorer
- Exchange it for a long-lived token (60-day expiry) using the token debugger
Token Expiration
Page Access Tokens expire. Use a long-lived token and monitor for expiration. The plugin will report authentication errors when the token expires.
Settings
Navigate to OwlStack > Facebook in the WordPress admin.
| Field | Description |
|---|---|
| App ID | Your Facebook App ID |
| App Secret | Your Facebook App Secret |
| Page Access Token | Long-lived access token for your Page |
| Page ID | Your Facebook Page's numeric ID |
| Graph API Version | API version to use (e.g., v19.0). Leave blank for the latest. |
Step-by-step
- Go to OwlStack > Facebook in your WordPress admin
- Paste your App ID
- Paste your App Secret
- Paste your Page Access Token
- Enter your Page ID (find it in your Page's About section or via the Graph API)
- Optionally set a specific Graph API Version
- Click Save Settings
Testing
After saving your settings:
- Click Test Connection to verify your access token and Page ID
- Click Send Test Message to publish a test post to your Page
- Check your Facebook Page to confirm the post appeared
Publishing
Once configured, Facebook appears as a toggle in the OwlStack meta box on post edit screens.
Programmatic publishing
// Simple page post
owlstack()->facebook('Hello from WordPress!');
// Post with a link
owlstack()->facebook('Check out our latest article: https://example.com/post');Constraints
| Constraint | Value |
|---|---|
| Max text length | 63,206 characters |
| Max images per post | 10 |
| Supported media types | JPEG, PNG, GIF, MP4 |
| Max video size | 10 GB |
Troubleshooting
| Issue | Solution |
|---|---|
| "Invalid access token" | Token may have expired; generate a new long-lived token |
| "Page not found" | Verify the Page ID is correct |
| "Permissions error" | Ensure your app has pages_manage_posts permission |
| Posts not visible | Check your Page's publishing permissions and visibility settings |