this post was submitted on 03 Jan 2024
80 points (98.8% liked)

Fediverse

28499 readers
312 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 2 years ago
MODERATORS
 

I wrote a detailed guide on configuring ActivityPub, Friends, and several other plugins to turn your self-hosted WordPress website into a node on the fediverse.

top 12 comments
sorted by: hot top controversial new old
[–] Zak@lemmy.world 6 points 10 months ago (1 children)

I've been largely disappointed with my attempts to use ActivityPub with Wordpress. I do revisit it every now and then.

Because of how federation works, you will not see any old posts. There is no mechanism for pulling up the history of posts and displaying them.

That's not true. Reading the ActivityPub outbox is the way to do that. Mastodon doesn't and I'm not entirely sure why (though I could probably find out).

I have also had poor results trying to use the Friends plugin with ActivityPub. Incoming replies result in high CPU usage for many seconds, and outgoing replies didn't show up last time I tried it.

[–] Jonamerica@midwest.social 2 points 10 months ago (1 children)

I agree, that the implementation has its issues, but it's a start. Version 2.0 is supposed to drop in a week or two, which brings some needed enhancements. I didn't realize that the lack of post history was Mastodon-specific. However, when I try to view my blog through different sources I have the same issue, so maybe that's a standard practice?

[–] Zak@lemmy.world 2 points 10 months ago* (last edited 10 months ago) (1 children)

I'm not sure if any projects actually do automatic backfill, but they could and there does seem to be a desire to implement it.

This is your ActivityPub outbox (as JSON). The part it doesn't seem to handle nicely is pasting an object ID/post URL into some other fediverse software to fetch the post manually, which is how someone would interact with an old post from a new follow on Mastodon.

I want to enable comments via ActivityPub (and only via ActivityPub) for a site I use Wordpress on, but I'm not sure I'm sufficiently motivated to try to debug the Friends plugin myself.

[–] Jonamerica@midwest.social 1 points 10 months ago (1 children)

Yes, that would be nice, although I'm not sure how implementation would work. You need something to anchor the toots to the post. The logical choice is the URL of the post. However, this can be accomplished already with webmention and doesn't need ActivityPub at all. You have to use something like Bridgy to monitor your account for your domain and then pass them to webmention. Unfortunately, Bridgy can be a little finicky.

I used to use a WordPress plugin that allowed people to post comments using their social media accounts, but that was just for verification and it wasn't an integration with social media.

[–] Zak@lemmy.world 1 points 10 months ago

The ideal technical implementation is that when a client requests the post with an accept header of application/ld+json; profile="https://www.w3.org/ns/activitystreams", Wordpress sends the ActivityPub version of the post instead of HTML. It should have the same content as the items in the outbox. There may be limitations in the Wordpress plugin API that prevent this.

Another implementation allowed by the standard would be to have a different URL for the ActivityPub ID and put the post's URL in the object's URL property, or insert it in the content. Perhaps version 2 of the plugin will handle this better.

[–] dtrain@lemmy.world 3 points 10 months ago (2 children)
[–] Jonamerica@midwest.social 4 points 10 months ago* (last edited 10 months ago)

For some reason it posted the image and not the link. I've updated the post, but here's the link as well. https://jseggers.com/technology/how-to-set-up-activitypub-for-self-hosted-wordpress-sites/

[–] 000@fuck.markets -1 points 10 months ago

Get a phone, join Mastodon. Then you're done, it seems.

[–] halm@leminal.space 3 points 10 months ago* (last edited 10 months ago)

Very cool, I had to manage the setup with the official support and scattered issues on the web. Glad you collated it all into one resource.

[–] thenexusofprivacy@lemmy.blahaj.zone 2 points 10 months ago (1 children)

This is great, thanks so much for taking the time to do it! I've been thinking of moving my Ghost blog/newsletter to Wordpress to take advantage of the fediverse integration, and one of the things that was holding me back is that I couldn't find a post like that that also includes the plugins and recommended settings.

I'll be importing my content (there are various utilities to turn the Ghost JSON export into an importable XML file). Any idea of that imported content will federate, or will it just be treated like old blog posts and not federate?

[–] Jonamerica@midwest.social 2 points 10 months ago (1 children)

My understanding is that followers will only see content from the time they subscribe/follow forward. As Zak mentioned in another comment it's not that they can't, but the platforms choose not to. That said, I don't use the website as my daily fediverse account for a number of reasons. The integrations I use allow for comments, likes, and boosts to be captured, even if they're not replying to a post from my blog account.

Also, if someone looks up my blog on Mastodon they get a message saying previous posts can be found on the original site with a link to my author page.

Got it, thanks much!