AD
Boost Your Brand on BlueSky—Exclusive banner space to amplify your reach within the BlueSky community.
BSkyInfo LogoBskyInfo
All ToolsCategoriesCollectionsFeed DirectoryLabeler DirectoryArticlesGuidesGlossaryBluesky SDKsSponsor
Submit
All ToolsCategoriesCollectionsFeed DirectoryLabeler DirectoryGuidesGlossaryArticlesBluesky SDKsSponsorSubmit
  1. SDKs
  2. /PHP
  3. /wp-bluesky-autopost-per-author
zerosonesfun

wp-bluesky-autopost-per-author

A PHP SDK for Bluesky and AT Protocol by zerosonesfun

Let each author at your WordPress website connect to their Bluesky account. When they publish a post, it is sent to their Bluesky account.

GitHub Stats

1stars
0forks
1contributors
0open issues

Dates

Created:April 4, 2025
Last updated:April 12, 2025

README

The following content is from wp-bluesky-autopost-per-author's GitHub repository. All rights reserved by the original author.

Bluesky Auto-Poster per Author

Let each author at your WordPress website connect to their Bluesky account. When they publish a post, it is sent to their Bluesky account. (There is a 1 to 2+ minute delay depending on if a token is expired and/or something like the image upload fails at first.)

Plugin Overview

This plugin allows each WordPress author to connect their Bluesky account using their handle and password. It then automatically posts published posts to their Bluesky account.

How It Works

1. Connecting Bluesky Account

Each author can connect their Bluesky account by using the provided shortcode [bsky_connect]. This renders a connection form for the author to connect or disconnect their Bluesky account.

2. Scheduling Auto-Post

When a post is published, the plugin schedules an auto-post to Bluesky with a delay of 1 minute using the wilcosky_bsky_schedule_auto_post function.

3. Auto-Posting to Bluesky

The wilcosky_bsky_auto_post function is triggered to perform the following steps:

  1. Check Post Status: Ensure the post is published and not already posted.
  2. Retrieve Post and User Meta: Get the post details and user meta information.
  3. Check Open Graph Data: Retrieve Open Graph data (title, description, and image) from the post link.
  4. Upload Image (if available): If an Open Graph image is found, upload it to Bluesky.
  5. Prepare Post Data: Prepare the data for posting, including text and embed (if image is uploaded).
  6. Post to Bluesky: Attempt to post the data to Bluesky.
  7. Token Handling: If the token is expired, the refresh token is used. If the refresh token is also expired, re-authentication is performed.

4. Retry Mechanism

If the initial posting attempt fails:

  1. First Attempt: The plugin will try to post again after a short delay.
  2. Second Attempt: If the first retry fails, it will attempt again.
  3. Third Attempt: As a foolproof mechanism, a third attempt will be made.

5. Frontend Log

Authors can view a log of their auto-post attempts, including any errors or successful posts, directly from the frontend.

6. Disconnecting Bluesky Account

Authors can disconnect their Bluesky account using the disconnect form rendered by the [bsky_connect] shortcode. This will remove all stored session tokens and credentials.

7. Uninstalling the Plugin

When the plugin is uninstalled, it will clean up all relevant data, including user metadata and post metadata, and clear any scheduled events related to auto-posting to Bluesky.

File Structure

  • wp-bluesky-autopost-per-author.php: The main plugin file containing all the functionality.

Installation

  1. Upload the plugin files to the /wp-content/plugins/wp-bluesky-autopost-per-author directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress.
  3. Add the [bsky_connect] shortcode to a page or post where authors can connect their Bluesky accounts.
  4. Important: Add the following line to your wp-config.php file, replacing 'randomkeyhere' with a long random key:
    define('WILCOSKY_BSKY_ENCRYPTION_KEY', 'randomkeyhere');
    

Usage

  • Connecting Account: Authors can connect their Bluesky account via the [bsky_connect] shortcode form.
  • Auto-Posting: The plugin automatically handles auto-posting when a post is published.
  • Disconnecting Account: Authors can disconnect their Bluesky account via the [bsky_connect] shortcode form.
  • Viewing Log: Authors can view the log of their auto-post attempts from the frontend.

License

This plugin is licensed under the GPL3 license.

Support

For support, contact Billy Wilcosky.

Topics

at-protocolblueskywordpresswordpress-plugin

Related SDKs

shahmal1yevblueskysdk

BlueSky SDK is a comprehensive PHP library designed to seamlessly integrate with the BlueSky social network.

29•PHP
cjrasmussenBlueskyApi

Simple helper for interacting with the Bluesky API/AT protocol

37•PHP
potibmphluesky

An small PHP library for Bluesky social using the AT Protocol.

34•PHP
aazsamirlibphpsky

Libphpsky is a PHP library designed to interact with Bluesky decentralized social media protocol - AT protocol.

5•PHP
sbm12bsky-Pack2List

Converting a BlueSky Starter Pack to User List

25•PHP
socialweb-phpatproto

A PHP library for integrating with and communicating over the AT Protocol

42•PHP

Resources

GitHub Repository

License

GPL-3.0

Author

zerosonesfun
zerosonesfun

Activity

Last commit: April 12, 2025
Commit frequency: Unknown

Our Sponsors

Your Brand Here!

50K+ engaged viewers every month

Limited spots available!

📧 Contact us via email🦋 Contact us on Bluesky
BSkyInfo LogoBskyInfo

The Most Comprehensive Bluesky Tools Directory

Stay updated with the latest Bluesky tools and ecosystem news 🦋

Bluesky butterfly logo
Quick LinksSubmit a ToolSponsorAboutLegal Information
ToolsFeed DirectoryLabeler DirectorySchedulingAnalyticsAll ToolsCategoriesCollectionsTags
ResourcesArticlesBluesky GuidesBluesky GlossaryBluesky SDKsBluesky ResourcesSkyRaffleMeida Coverage
Our ProductsRaffleBlueAiTeach ToolsLaiewAI affiliate listFirsto

This website may contain affiliate links

© 2025 BskyInfo. All rights reserved.