[2025-01-31 07:31:05] handle_post called for post ID: 412
[2025-01-31 07:31:05] Post is published and of type 'post', calling post_to_bluesky
[2025-01-31 07:31:05] post_to_bluesky called for post ID: 412
[2025-01-31 07:31:05] Authenticating with Bluesky
[2025-01-31 07:31:06] Authentication successful, DID: did:plc:mykxqqi3betsgojbkhos7***
[2025-01-31 07:31:06] No image URL found
[2025-01-31 07:31:06] Posting to Bluesky with data: {"repo":"did:plc:mykxqqi3betsgojbkhos7mav","collection":"app.bsky.feed.post","record":{"text":"","createdAt":"2025-01-31T07:31:06+00:00","embed":{"$type":"app.bsky.embed.external","external":{"uri":"https:\/\/****.com\/2025\/01\/31\/test\/","title":"test","description":"test2","thumb":""}}}}
[2025-01-31 07:31:06] Failed to post to Bluesky. Status code: 400, Body: {"error":"InvalidRequest","message":"Invalid app.bsky.feed.post record: Record/embed/external/thumb should be a blob ref"}
[2025-01-31 07:31:07] Plugin initialized
i’m running v1.3. This is on a fresh install.
What’s odd is that whether I specify an image, featured or not, it says “No image URL found”.
]]>Emma,
I really appreciate your Bluesky auto-poster. It is simple and doesn’t get in the way. It simply works.
I wish there was a similar auto-poster for Facebook. Everything currently available in the WP plugin list is bloated code. I don’t want a plugin that will do everything, including some things already done by other plugins, which inevitably causes conflicts. I just want a simple plugin that does one thing well.
Thanks again,
Nick
]]>Hi,
I’m using version 6.7.1 and the classic editor. I updated a blog post, which was created before I installed your plugin. Consequently, the individual field “bluesky_shared” is not available and not set. So maybe your plugin should check for this field, and if it is not available, add this field and set it to 1. At least, this could be a solution…
Another solution would be some kind of extra checkbox in the sidebar if an update should be pushed to Bluesky or not. So one can decide individually for the push or not…
Toengel@Alex
]]>The plugin had been working great until Dec. 27th. Since then, I have been getting this in the log file (for example):
[2024-12-31 00:16:30] handle_post called for post ID: 50140
[2024-12-31 00:16:30] Post is published and of type 'post', calling post_to_bluesky
[2024-12-31 00:16:30] post_to_bluesky called for post ID: 50140
[2024-12-31 00:16:30] Authenticating with Bluesky
[2024-12-31 00:16:30] Authentication successful, DID: <obfuscated>
[2024-12-31 00:16:30] Attempting to upload image: https://mysite.com/wp-content/uploads/2024/12/50140_generated_1735604188.jpg
[2024-12-31 00:16:31] Image uploaded successfully
[2024-12-31 00:16:31] Posting to Bluesky with data: {"repo":"<obfuscated>","collection":"app.bsky.feed.post","record":{"text":"","createdAt":"2024-12-31T00:16:30+00:00","embed":{"$type":"app.bsky.embed.external","external":{"uri":"https:\/\/mysite.com\/article-title\/","title":"Article Title","description":"Article excerpt...","thumb":{"$type":"blob","ref":{"$link":"bafkreicmze54vmxtzav2wtq4w6hqcgsnocfnyer5zjmvu3a6enxz655a6y"},"mimeType":"text\/html","size":8177}}}}}
[2024-12-31 00:16:31] Failed to post to Bluesky. Status code: 400, Body: {"error":"InvalidMimeType","message":"Wrong type of file. It is text/html but it must match image/*."}
I substituted the actual site identity, article title and excerpt in the example above.
Am I the only one getting this? How can I troubleshoot further?
I don’t believe I have any ability to change the payload that’s being delivered to Bluesky. No changes were made to the site, with the caveat that WP Core, plugins and themes auto-update.
]]>All posts are displaying the same text: https://www.dropbox.com/scl/fi/rozaik4kdrel2tz81deb4/Bluesky-excerpt.png?rlkey=ipurr8ozh2m5voa7b0yzlizpg&st=u7c4sh3w&dl=0, regardless of the excerpt in the post.
]]>The plugin was working great until a week ago: https://www.dropbox.com/scl/fi/05ddzm6lu9upilde0a2d9/Bluesky-page.png?rlkey=jcln3vgl3pujbyc6e3xany2fa&st=szpod20u&dl=0
When I try to post anything after this date, I get the message “Post already shared to Bluesky, skipping”: https://www.dropbox.com/scl/fi/9vxwq71vm88t5gl84bk4f/Bluesky-plugin-log.png?rlkey=79pyflsepx8sr1j9rk9el7rdf&st=ct0bjhw9&dl=0 but the post is not showing on Bluesky.
I already removed and reinstalled the plugin, no effect. It didn’t seem that removing did much because the identifier and password were back when I reinstalled.
]]>This plugin is awesome. Will there be an option to have the Title and as much of the post content as possible shown in addition to the Featured Image? There are two other plugins that do offer this ability, but neither of them have image capabilities. It would be great to have that as an option in this plugin.
]]>Thank you for making this great, simple plugin. The post is making across to Bluesky fine, but the featured image stopped being published 6 days ago. Oddly, one post from today the image was posted. Any clues?
]]>Hello, I am configuring this plugin for my site however I use MFA for BlueSky (as we all should) and this plugin doesn’t seem to support that. Am I missing something or is this a feature that’s not yet built?
]]>As per the title does this work for custom post types?
]]>I noticed that ALT text that I’d added to this image
https://salutethepig.com/like-a-ball-and-chain/
before it was auto-posted to Bluesky wasn’t displayed there. Is this a known problem/limitation or does the fact that I also inserted a hyperlink in the image for the post in the WordPress block maybe at issue?
Thanks again.
]]>Before I ask the question below, can I just say “Thanks for the plug-in”; if I can get it working again, I’ll be very happy.
Not sure how to read the detail of what the log indicates went wrong, so any guidance would be appreciated.
The first post this morning (a test one) went fine and the log shows this:
[2024-12-02 06:04:55] Plugin initialized
[2024-12-02 06:04:55] handle_post called for post ID: 17378
[2024-12-02 06:04:55] Post is published and of type 'post', calling post_to_bluesky
[2024-12-02 06:04:55] post_to_bluesky called for post ID: 17378
[2024-12-02 06:04:55] Authenticating with Bluesky
[2024-12-02 06:04:56] Authentication successful, DID: did:plc:wkdeimobli4jm3ogj2p5oexs
[2024-12-02 06:04:56] Plugin initialized
[2024-12-02 06:04:57] No image URL found
[2024-12-02 06:04:57] Posting to Bluesky with data: {"repo":"did:plc:wkdeimobli4jm3ogj2p5oexs","collection":"app.bsky.feed.post","record":{"text":"","createdAt":"2024-12-02T06:04:57+00:00","embed":{"$type":"app.bsky.embed.external","external":{"uri":"https:\/\/salutethepig.com\/testing-testing-testing\/","title":"Testing, testing, testing…","description":"1-2-3 \"Is this thing on?\"","thumb":""}}}}
[2024-12-02 06:04:57] Failed to post to Bluesky. Status code: 400, Body: {"error":"InvalidRequest","message":"Invalid app.bsky.feed.post record: Record/embed/external/thumb should be a blob ref"}
[2024-12-02 06:04:57] Plugin initialized
[2024-12-02 06:04:58] handle_post called for post ID: 17378
[2024-12-02 06:04:58] Post is published and of type 'post', calling post_to_bluesky
[2024-12-02 06:04:58] post_to_bluesky called for post ID: 17378
[2024-12-02 06:04:58] Authenticating with Bluesky
[2024-12-02 06:04:58] Authentication successful, DID: did:plc:wkdeimobli4jm3ogj2p5oexs
[2024-12-02 06:04:58] Attempting to upload image: https://salutethepig.com/wp-content/uploads/2024/12/Competency-Profiler-Guess-Who.webp
[2024-12-02 06:05:00] Image uploaded successfully
[2024-12-02 06:05:00] Posting to Bluesky with data: {"repo":"did:plc:wkdeimobli4jm3ogj2p5oexs","collection":"app.bsky.feed.post","record":{"text":"","createdAt":"2024-12-02T06:04:58+00:00","embed":{"$type":"app.bsky.embed.external","external":{"uri":"https:\/\/salutethepig.com\/testing-testing-testing\/","title":"Testing, testing, testing…","description":"1-2-3 \"Is this thing on?\"","thumb":{"$type":"blob","ref":{"$link":"bafkreifw3zped42xgpeapty6dstsb46ivl7u2ie3phuzmon6euy76amnae"},"mimeType":"image\/webp","size":207458}}}}}
[2024-12-02 06:05:00] Successfully posted to Bluesky. Response: {"uri":"at:\/\/did:plc:wkdeimobli4jm3ogj2p5oexs\/app.bsky.feed.post\/3lcche4wibq2o","cid":"bafyreihogusw7pdhpfrvimtbl4kylmdeyiipgkphwrbiyjzghgomjvlrxy","commit":{"cid":"bafyreiflh4ckgxanefrknamfjidltpjqjxfsbzl742de7up3xncq4qmxaa","rev":"3lcche4wszi2o"},"validationStatus":"valid"}
[2024-12-02 06:05:00] Plugin initialized
The second post shows errors in the log but I don’t know what I need to do to fix them:
[2024-12-02 12:51:43] Plugin initialized
[2024-12-02 12:51:44] handle_post called for post ID: 17382
[2024-12-02 12:51:44] Post is published and of type 'post', calling post_to_bluesky
[2024-12-02 12:51:44] post_to_bluesky called for post ID: 17382
[2024-12-02 12:51:44] Authenticating with Bluesky
[2024-12-02 12:51:44] Authentication successful, DID: did:plc:wkdeimobli4jm3ogj2p5oexs
[2024-12-02 12:51:44] Plugin initialized
[2024-12-02 12:51:45] No image URL found
[2024-12-02 12:51:45] Posting to Bluesky with data: {"repo":"did:plc:wkdeimobli4jm3ogj2p5oexs","collection":"app.bsky.feed.post","record":{"text":"","createdAt":"2024-12-02T12:51:45+00:00","embed":{"$type":"app.bsky.embed.external","external":{"uri":"https:\/\/salutethepig.com\/nothing-to-add-just-look-devour-with-your-eyes\/","title":"Nothing to add; just look & devour with your eyes","description":"This beautiful, intricate ceramic pig piece is one of Val Littlewood's; it's a constant pleasure to see it; I smile every time it catches my eye.","thumb":""}}}}
[2024-12-02 12:51:45] Failed to post to Bluesky. Status code: 400, Body: {"error":"InvalidRequest","message":"Invalid app.bsky.feed.post record: Record/embed/external/thumb should be a blob ref"}
[2024-12-02 12:51:45] Plugin initialized
[2024-12-02 12:51:46] Plugin initialized
[2024-12-02 12:51:46] handle_post called for post ID: 17382
[2024-12-02 12:51:46] Post is published and of type 'post', calling post_to_bluesky
[2024-12-02 12:51:46] post_to_bluesky called for post ID: 17382
[2024-12-02 12:51:46] Authenticating with Bluesky
[2024-12-02 12:51:46] Plugin initialized
[2024-12-02 12:51:46] Authentication successful, DID: did:plc:wkdeimobli4jm3ogj2p5oexs
[2024-12-02 12:51:47] Plugin initialized
[2024-12-02 12:51:47] Attempting to upload image: https://salutethepig.com/wp-content/uploads/2024/12/Pig-front.avif
[2024-12-02 12:51:47] Image upload failed: 500, {"error":"InternalServerError","message":"Internal Server Error"}
[2024-12-02 12:51:47] Failed to upload image
[2024-12-02 12:51:47] Posting to Bluesky with data: {"repo":"did:plc:wkdeimobli4jm3ogj2p5oexs","collection":"app.bsky.feed.post","record":{"text":"","createdAt":"2024-12-02T12:51:47+00:00","embed":{"$type":"app.bsky.embed.external","external":{"uri":"https:\/\/salutethepig.com\/nothing-to-add-just-look-devour-with-your-eyes\/","title":"Nothing to add; just look & devour with your eyes","description":"This beautiful, intricate ceramic pig piece is one of Val Littlewood's; it's a constant pleasure to see it; I smile every time it catches my eye.","thumb":""}}}}
[2024-12-02 12:51:48] Failed to post to Bluesky. Status code: 400, Body: {"error":"InvalidRequest","message":"Invalid app.bsky.feed.post record: Record/embed/external/thumb should be a blob ref"}
[202
Any more detail I can add to help here?
Thanks ??
]]>Deleted
]]>Issue:?Your plugin hooks the?handle_post
?method to both?publish_post
?and?wp_insert_post
?actions:
This means that?handle_post
?is executed twice for a single post creation:
publish_post
).wp_insert_post
).Recommendation:?Remove the?wp_insert_post
?hook and rely solely on the?publish_post
?hook. This ensures that?handle_post
?is only triggered once when the post is actually published, reducing the risk of conflicts.
Modified Constructor:
public function __construct() {
add_action('publish_post', [$this, 'handle_post'], 10, 2);
// Remove the following line to prevent double execution
// add_action('wp_insert_post', [$this, 'handle_post'], 10, 3);
add_action('admin_menu', [$this, 'add_settings_page']);
add_action('admin_init', [$this, 'register_settings']);
add_action('plugins_loaded', [$this, 'load_plugin_textdomain']);
// Set up logging
$upload_dir = wp_upload_dir();
$this->log_file = $upload_dir['basedir'] . '/bluesky_poster_log.txt';
$this->log(__("Plugin initialized", 'simple-auto-poster-for-bluesky'));
}
]]>
The plugin is working great, but I’m wondering if there’s a way to disable the fact it pushes a new post to Bluesky whenever I make an edit to an existing post? Example: I publish the initial blog post, but make two separate edits hours later. Bluesky pushes out the same post two more times to the timeline.
Additionally, having the option to include the post title + link would be best. I know Bluesky pulls a media card with the title, but being able to customize the output would be a plus. Thank you! ??
]]>For example, the Share on Mastodon plugin allows customizing like this: https://jan.boddez.net/articles/customize-share-on-mastodon-statuses
Any hooks that would permit this?
Thanks for the plugin!
]]>I just installed and it seems to be working great, except for the images.
I was using Buffer to post to Bluesky and it posted the images correctly (square 640×640 pixels)
I’m not sure how your app works but it only shows 50% of the image height and clicking on it takes the user to the page on my website. Too tell the truth that’s preferable to what buffer was doing. Posting an image and posting a link.
I don’t care if the displayed images is resized but is there a way to show the full height and width?
]]>absolutely nothing happens on bluesky when i post on my website
]]>I thought that I had already posted this issue. Apparently I forgot to click SUBMIT, so here goes again.
I have recently installed this plugin and I like it. However, I notice that the plugin inserts the current time rather than the original posted time of the blog entry. This shouldn’t be a concern if all Bsky posts are created immediately after the WP post is published. However, if there is a delay, then Bsky posts may be out of order. (I have also been posting older WP posts to my Bsky feed, so I would like them to show the older date.)
To make this change, I edited the code with the following (edits shown in bold):
<code>
// Fetch OpenGraph data
$og_data = $this->get_og_data($permalink);
if (isset ( $og_data['published_time'] ) ){ $createdAt = $og_data['published_time']; } // timestamp scraped from post at $permalink
else { $createdAt = date('c'); } // default timestamp
$post_data = [
'repo' => $did,
'collection' => 'app.bsky.feed.post',
'record' => [
'text' => '', // Empty text field
'createdAt' => $createdAt
]
];
</code>
Open Graph recognizes the article:published_time meta property. It calls for the time in UTC, so the default time should probably be date(‘c’). gmdate() gives GMT, which has daylight savings, date() gives UTC, which does not.
The published time is scraped with the other og_data from the page at $permalink. This required a further edit of the get_og_data() function as follows:
<code>
private function get_og_data($url) {
$response = wp_remote_get($url);
$html = wp_remote_retrieve_body($response);
$og_data = [];
if (preg_match('/<meta property="og:title" content="(.*?)"/', $html, $match)) {
$og_data['title'] = $match[1];
}
if (preg_match('/<meta property="og:description" content="(.*?)"/', $html, $match)) {
$og_data['description'] = $match[1];
}
if (preg_match('/<meta property="og:image" content="(.*?)"/', $html, $match)) {
$og_data['image'] = $match[1];
}
if (preg_match('/<meta property="article:published_time" content="(.*?)"/', $html, $match)) {
$og_data['published_time'] = $match[1];
}
return $og_data;
}
</code>
]]>
Hi, I appreciate your plugin. It is working well. I have just joined Bluesky and I am posting to Bsky a few of my latest blog posts. I’ve discovered that the plugin assigns the a new posting time, rather than scraping the original published time from the page. Perhaps that would work for some users, but it is not what I was intending. I have made a few minor changes to your code to implement my preference. See the following:
<code>
// Fetch OpenGraph data
$og_data = $this->get_og_data($permalink);
if(isset($og_data['published_time'])){$createdAt = $og_data['published_time'];}
else{$createdAt = gmdate('c');}
$post_data = [
'repo' => $did,
'collection' => 'app.bsky.feed.post',
'record' => [
'text' => '', // Empty text field
'createdAt' => $createdAt
]
];
private function get_og_data($url) {
$response = wp_remote_get($url);
$html = wp_remote_retrieve_body($response);
$og_data = [];
if (preg_match('/<meta property="og:title" content="(.*?)"/', $html, $match)) {
$og_data['title'] = $match[1];
}
if (preg_match('/<meta property="og:description" content="(.*?)"/', $html, $match)) {
$og_data['description'] = $match[1];
}
if (preg_match('/<meta property="og:image" content="(.*?)"/', $html, $match)) {
$og_data['image'] = $match[1];
}
if (preg_match('/<meta property="article:published_time" content="(.*?)"/', $html, $match)) {
$og_data['published_time'] = $match[1];
}
return $og_data;
}
</code>
I also notice that you use gmdate() which uses GMT, rather than date(). I am not sure which is expected by Bsky, but UTC is default in most cases. GMT uses daylight savings.
]]>nice to use your wordpress plugin for bluesky, works fine
the only thing that worries me is that the logfile has to many entries that are obsolete
every minute an entry with no news
[2024-11-19 14:02:11] Plugin initialized [2024-11-19 14:02:11] Plugin initialized [2024-11-19 14:02:11] Plugin initialized [2024-11-19 14:02:12] Plugin initialized [2024-11-19 14:02:12] Plugin initialized [2024-11-19 14:02:12] Plugin initialized [2024-11-19 14:02:12] Plugin initialized [2024-11-19 14:02:12] Plugin initialized [2024-11-19 14:02:12] Plugin initialized [2024-11-19 14:02:12] Plugin initialized [2024-11-19 14:02:12] Plugin initialized [2024-11-19 14:02:12] Plugin initialized [2024-11-19 14:02:12] Plugin initialized [2024-11-19 14:02:13] Plugin initialized [2024-11-19 14:02:13] Plugin initialized [2024-11-19 14:02:13] Plugin initialized [2024-11-19 14:02:13] Plugin initialized [2024-11-19 14:02:13] Plugin initialized [2024-11-19 14:02:13] Plugin initialized [2024-11-19 14:02:13] Plugin initialized [2024-11-19 14:02:13] Plugin initialized [2024-11-19 14:02:13] Plugin initialized [2024-11-19 14:02:13] Plugin initialized [2024-11-19 14:02:14] Plugin initialized [2024-11-19 14:02:14] Plugin initialized [2024-11-19 14:02:15] Plugin initialized [2024-11-19 14:02:16] Plugin initialized [2024-11-19 14:02:26] Plugin initialized [2024-11-19 14:02:28] Plugin initialized [2024-11-19 14:02:31] Plugin initialized [2024-11-19 14:02:31] Plugin initialized [2024-11-19 14:02:34] Plugin initialized [2024-11-19 14:02:36] Plugin initialized [2024-11-19 14:02:46] Plugin initialized [2024-11-19 14:02:56] Plugin initialized [2024-11-19 14:02:59] Plugin initialized [2024-11-19 14:03:06] Plugin initialized [2024-11-19 14:03:12] Plugin initialized
]]>Plugin publishes multiple copies of the same post to bsky. At one count I had over 13 posts of the exact same post on bsky due to this plugin.
Please advise.
When I post a blog article, nothing is posted on my bluesky account. I’ve set things up as described in the manual, but the only thing that’s in the log is:
[2024-11-12 20:32:21] Plugin initialized
[2024-11-12 20:32:21] Plugin initialized
[2024-11-12 20:32:28] Plugin initialized
Etc. There’s only lines like that in the log. So this doesn’t seem to get triggered:
add_action('publish_post', [$this, 'handle_post'], 10, 2);
I usually post via the xmlrpc API, but “manually” posting through the web interface doesn’t seem to trigger the action, either. Any suggestions for debugging this?
]]>Does this plugin post bbress topics and replies as well as posts ?
]]>Do the plugin post only new posts or can it be a re-poster, for example, to post every 30 minutes?
]]>