Integrating WordPress and Mastodon using ActivityPub

Last year, Automattic (which runs WordPress.com) acquired an ActivityPub plugin for the WordPress CMS/blogging platform. This caught my eye, as Elon’s sabotage of Twitter was continuing apace, finally giving me impetus to switch over to Mastodon and explore it and the other services that interoperate with it through the ActivityPub protocol.

I installed the plugin on a couple of websites I run, and have been delighted to discover several interesting things:

  • ActivityPub makes a better-than-RSS replacement for RSS. Since ActivityPub is a bidirectional protocol, using it to keep up on websites allows commenters to interact with your site without having to visit.
  • The ActivityPub plugin runs quietly alongside your other syndication methods, and doesn’t require any additional care and feeding once it’s set up.
  • The plugin can also publish content types other than weblog posts. I use an event calendar plugin on one of the sites where I use ActivityPub, and have that site configured so that each of those also is published as an ActivityPub item when I post it.
  • The plugin works great out of the box with Mastodon. I haven’t tried it with other ActivityPub clients, but it seems to have enough flexibility around how articles are published to ensure that one could get it working smoothly without much fuss, and has explicit support for many other clients.

Setting Up and Using It

I’ll use my band’s website, www.thehappyout.com, as an example. Here’s what I did:

  • Installed and configure the ActivityPub plugin on my WordPress site.
  • Using my personal Mastodon account, searched for profile @news@www.thehappyout.com and followed it. (Thanks to WebFinger support, searching for www.thehappyout.com also works.)
  • Posts on the website now appear in my Mastodon feed.
  • I can now reply to these posts, just as I would to one that had originated in Mastodon.
  • These replies go through the normal WordPress moderation channels and appear on the website just like any comments would that originated on the site itself.

It’s great to see all of this interoperating so smoothly at this point. Big props to Matthias Pfefferle & Automattic for their investment here!

Open Issues

  • It’s common to link to social media sites with a bunch of icons. I can do that to a Mastodon profile, but haven’t figured out a good way to do so with this approach.
  • When an event is published through this mechanism, the time/date and location are not included in the ActivityPub item. If there’s a way to include this sort of metadata in one’s published feed, I haven’t yet figured it out.
  • How do authors who rely on advertising on-site manage monetization if readers don’t have to visit the site? (This was a question for RSS as well, and I suspect the answers will be similar: include ads in the feed itself, or only include excerpts in the feed so readers are still encouraged to visit the site proper.)

Moving Servers

Dear Internet:

I am currently in the process of moving this weblog from one server to another. The old server was having troubles that my hosting service was unable to figure out how to fix, so I’m relocating to one of their shiny new boxes with Solaris on it. Things may be slightly bumpy while I work out any kinks, but I should be a more cheerful blogger once the dust settles, since I won’t have to deal with the scourge of comment spam any longer. Hooray!

Your friend,

Sean

UPDATE: A big thank you to Greg Pierce, who pointed me to the excellent Bad Behavior plugin to help keep the comment spam in check.

Back Issues Online

I finally got around to fiddling with some code today to get my old weblog content imported here. You can now read all of my posts back to March 2000 if you have nothing better to do. (I assure you, however, you do.)

In other news, today is Abigail’s 11th birthday! Be sure to lavish love, affection, and extravagant gifts upon her if you happen to cross paths.

Moving to WordPress

This weblog has always been run on Conversant, an excellent groupware, weblogging and publishing tool created by Macrobyte Resources. I worked for the company back in 2000, and enjoyed that time immensely, thanks both to the superb people I was surrounded by and the great projects we got to work on together. It was a remarkable place, cranking out some cutting-edge communication software with a completely distributed workforce, spread across several states, countries, and time zones. Alas, we eventually all moved in different directions, though Conversant lived on and continued to grow and to be improved.

And while Conversant has served me personally long and well, I’m finally moving the website off of it and on to WordPress, a nifty open-source publishing system that lacks some of the really amazing features that Conversant boasts, but which is easier for me to tweak for myself and which has a large and active community of people doing interesting things with it. This is a tough decision, as I’ve invested a lot into Conversant, and am reluctant to let it go, but after dithering about it for a year, finally feel like the time has come for this site. (I’m still using Conversant for some of the applications I’ve developed for our church, and have no plans to move those any time soon.)

I’ve moved a bit of the old content over already, and will be bringing over more as I’m able to get it exported from the old site. The look and feel will likely change regularly for a while as I experiment and settle in to the new digs, so please be patient if you turn up one day and it suddenly looks like MySpace (eww). This too shall pass.