Follow button with Activity Intents

I don’t want to brag but I finally added a follow button to my static jekyll blog. Because it uses Activity Intents, a visitor can remotely follow my fediverse account regardless of where their host server lives as long as their server supports Activity Intents. The good news is that mastodon.social already supports this as it is running the nightly build. It will be included in the next major release (4.6) as mentioned in Trunk & Tidbits, March 2026 so that other Mastodon servers will support it.

Usually, the idea is suppose a visitor Alice from home server A.com visits Bob’s account on server B.com. Alice would like to easily follow Bob. Alice clicks on the follow button and is prompted for her fediverse address and she submits alice@A.com. Her browser makes a CORS webfinger request to A.com so that the web page at B.com can discover what url to redirect Alice to so that she can follow Bob from her home server where she is logged in. My setup is slightly different because my follow button is on my blog instead of on my fediverse server.

The code was added to Mastodon in Add support for FEP-3b86 (Activity Intents) (#38120) and it seems there are 2 different values for “rel” a home server may offer to accept a follow: 4.10 Follow Intent and 5.1 Object Intent so my button accepts 2 different values.

var rels = ['https://w3id.org/fep/3b86/Follow', 'https://w3id.org/fep/3b86/Object'];

Intents are for all activities but it seems there is a tendency for fediverse home servers to support just a subset of activities at the moment. Earlier this week, I added support just for follow and like for my home server. Since my webfinger identifier has a different domain than my fediverse server, I also had to add intents to webfinger in my jekyll software as well as allow webfinger to respond to CORS request.