Syndicating to Bluesky
Last year I described how I syndicate my posts to different social networks.
Back then my approach to syndicating to Bluesky was to piggy-back off my micro.blog account (which is really just the RSS feed of my notes):
Micro.blog can also cross-post to other services. One of those services is Bluesky. I gave permission to micro.blog to syndicate to Bluesky so now my notes show up there too.
It worked well enough, but it wasn’t real-time and I didn’t have much control over the formatting. As Bluesky is having quite a moment right now, I decided to upgrade my syndication strategy and use the Bluesky API.
Here’s how it works…
First you need to generate an app password. You’ll need this so that you can generate a token. You need the token so you can generate …just kidding; the chain of generated gobbledegook stops there.
Here’s the PHP I’m using to generate a token. You’ll need your Bluesky handle and the app password you generated.
Now that I’ve got a token, I can send a post. Here’s the PHP I’m using.
There’s something extra code in there to spot URLs and turn them into links. Bluesky has a very weird way of doing this.
It didn’t take too long to get posting working. After some more tinkering I got images working too. Now I can post straight from my website to my Bluesky profile. The Bluesky API returns an ID for the post that I’ve created there so I can link to it from the canonical post here on my website.
I’ve updated my posting interface to add a toggle for Bluesky right alongside the toggle for Mastodon. There used to be a toggle for Twitter. That’s long gone.
Now when I post a note to my website, I can choose if I want to send a copy to Mastodon or Bluesky or both.
One day Bluesky will go away. It won’t matter much to me. My website will still be here.