ActivityPub

Beschreibung

Steig mit ActivityPub ins Fediverse ein und erreiche mit deinem Blog ein größeres Publikum. Gewinne Follower, verteile Updates und sammle Kommentare aus der diversen Nutzerschaft von ActivityPub-kompatiblen Plattformen.

Mit installiertem ActivityPub-Plugin funktioniert dein WordPress-Blog selbst als föderiertes Profil, dazu kommen Profile für jeden Autor. Wenn deine Website beispielsweise example.com ist, dann findet man das blog-weite Profil unter @example.com@example.com. Autoren wie Jane und Bob wiederum hätten ihre individuellen Profile jeweils unter @jane@example.com und @bobz@example.com.

Ein Beispiel: Ich gebe dir meinen Mastodon-Profilnamen @pfefferle@mastodon.social. Du suchst danach, findest mein Profil und klickst auf „Folgen“. Jetzt erscheint jeder Beitrag von mir auf deiner Startseite. Auf die gleiche Weise kannst du mit dem ActivityPub-Plugin Janes Profil bei @jane@example.com finden und folgen.

Sobald du Janes Profil @jane@example.com folgst, landet jeder Beitrag, den sie auf on example.com erstellt, auf deiner Startseite. Und wenn du dem blogweiten Profil @example.com@example.com folgst, erhältst du Updates von allen Autoren.

Hinweis: Wenn deinem Autor oder Blog niemand folgt, bleiben deine Beiträge unsichtbar. Ob das Plugin funktioniert, findest du am leichtesten heraus, indem du deinem eigenen Profil folgst. Wenn du bereits ein Mastodon-Profil hast, beginne, indem du deinem neuen folgst.

Das Plugin funktioniert mit den folgenden getesteten föderierten Plattformen, es könnte aber noch mehr geben, mit denen es ebenfalls klappt:

Einige Dinge solltest du beachten:

  1. Das blog-weite Profil funktioniert nur für Websites mit aktivierten Rewrite Rules. Wenn deine Website Rewrite Rules nicht aktiviert hat, könnten die autorenspezifischen Profile trotzdem funktionieren.
  2. Viele Einzelautoren-Blogs haben ihre Autoren-Profilseiten deaktiviert oder über ein SEO-Plugin wie Yoast oder Rank Math umgeleitet. Das geschieht normalerweise, um Duplicate Content mit der Homepage des Blogs zu vermeiden. Wenn deine Autorenseite auf diese Weise deaktiviert wurde, dann funktionieren die Autorenprofile von ActivityPub bei dir nicht. Stattdessen kannst du die Autorenprofilseite wieder einschalten und im SEO-Plugin die Option wählen, die Autorenseite nicht zu indexieren. Das verhindert Duplicate-Content-Probleme mit Suchmaschinen und stellt sicher, dass die Autorenprofile von ActivityPub funktionieren.
  3. Sobald ActivityPub installiert ist, sind nur ab dann neu veröffentlichte Beiträge im Fediverse verfügbar. Und auch wenn du ActivityPub schon länger einsetzt, sieht, wer dir neu folgt, nur die Beiträge, die du von diesem Zeitpunkt an neu publizierst. Früher geschriebene Beiträge sieht er niemals auf der Startseite. Das funktioniert ganz ähnlich wie beim Abonnieren eines Newsletters. Wenn du einen Newsletter bestellst, bekommst du nur künftige E-Mails, aber nicht die alten archivierten . Folgt jemand deiner Website mit ActivityPub, so empfängt er nur die neuen Beiträge, die du ab dann veröffentlichst.

Wie also läuft das ab?

  1. Installiere das ActivityPub-Plugin.
  2. Geh zu den Einstellungen des Plugins und passe diese nach Belieben an. Wenn du fertig bist, klicke auf den Speichern-Button.
  3. Stelle sicher, dass die Autoren-Profilseite deines Blogs aktiv ist, wenn du du Autoren-Profile verwendest.
  4. Besuche Mastodon oder jede andere föderierte Plattform, such nach deinem Profil und folge diesem. Dein neues Profil sieht entweder aus wie @your_username@example.com oder wie @example.com@example.com, danach solltest du also suchen.
  5. Veröffentliche einen neuen Beitrag in deinem Blog.
  6. Prüfe in Mastodon, ob der neue Beitrag auf deiner Startseite erscheint.

Beachte bitte, dass es bis zu rund 15 Minuten dauern kann, bis der neue Beitrag in deinem föderierten Feed erscheint. Das liegt daran, dass die Nachrichten über einen verzögerten cron an die föderierten Plattformen gesendet werden. Das soll verhindern, dass das Veröffentlichen für Benutzer mit einer Menge Follower unterbrochen wird. Es ist also kein Grund zur Sorge, wenn er nicht unmittelbar auftaucht. Lass ihm etwas Zeit. In den meisten Fällen wird er binnen weniger Minuten erscheinen. Dann weißt du, dass alles wie erwartet funktioniert.

Blöcke

Dieses Plugin unterstützt 2 Blöcke.

  • Follow me on the Fediverse Display your Fediverse profile so that visitors can follow you.
  • Fediverse Followers Display your followers from the Fediverse on your website.

Installation

Folge den normalen Anweisungen für die WordPress-Plugin-Installation.

Automatische Plugin-Installation

So fügst du ein WordPress-Plug-in mit dem integrierten Plugin-Installer hinzu:

  1. Gehe zu Plugins > Installieren.
  2. Gib „activitypub“ in die Box Suche Plugins ein.
  3. Suche das WordPress-Plugin, das installiert werden soll.
    1. Klicke auf Details für weitere Informationen zum Plugin und Anleitungen, die du für die Einrichtung des Plugins vielleicht drucken oder speichern möchtest.
    2. Um das WordPress-Plugin zu installieren, klicke auf Jetzt installieren.
  4. Der resultierende Installationsbildschirm zeigt die Installation als erfolgreich an oder weist auf Probleme während der Installation hin.
  5. Falls erfolgreich, klicke Plugin aktivieren, um es zu aktivieren, oder Zum Plugin-Installer zurückkehren für weitere Aktionen.

Manuelle Plugin-Installation

Es gibt einige wenige Fälle, in denen die manuelle Installation eines WordPress-Plugins angebracht ist.

  • Wenn du den Speicherort und den Installationsprozess eines WordPress-Plugins kontrollieren möchtest.
  • Falls dein Server keine automatische Installation eines WordPress-Plugins erlaubt.
  • Wenn du die neueste Entwicklungsversion ausprobieren möchtest.

Die manuelle Installation eines WordPress-Plugins setzt FTP-Kenntnisse sowie das Bewusstsein voraus, dass du deine Website aufs Spiel setzen könntest, wenn du ein WordPress-Plugin installierst, dass mit der aktuellen Version nicht kompatibel ist oder aus einer unzuverlässigen Quelle stammt.

Sichere deine Website komplett, bevor du weitermachst.

Um ein WordPress-Plugin von Hand zu installieren:

  • Lade dein WordPres-Plugin auf deinen Desktop herunter.
  • Falls du es als Zip-Archiv herunterlagen hast, entpacke den Plugin-Ordner auf deinem Desktop.
  • Lade den Plugin-Ordner mit deinem FTP-Programm in den Ordner wp-content/plugins in deinem WordPress-Verzeichnis hoch.
  • Geh zum Plugins-Bildschirm und such das neu hochgeladene Plugin in der Liste.
  • Klicke Aktivieren, um es zu aktivieren.

FAQ

tl;dr

Dieses Plugin verbindet dein WordPress-Blog mit beliebten sozialen Plattformen wie Mastodon und macht es damit einem größeren Publikum zugänglich. Einmal installiert, können dir Benutzer auf diesen Plattformen folgen, wodurch deine neuen Beiträge in ihren Feeds erscheinen.

Wie ist der Status dieses Plugins?

Bereits Implementiert:

  • blog profile pages (JSON representation)
  • Autoren-Profilseiten (JSON-Darstellung)
  • individuelle Links
  • funktionaler Posteingang/-ausgang
  • folgen (Folgen annehmen)
  • Beiträge teilen
  • Kommentare/Reaktionen erhalten
  • Signaturprüfung

Noch zu implementieren:

  • Unterstützung für verschachtelte Kommentare
  • Shortcodes durch Layout-Blöcke ersetzt

Was ist „ActivityPub für WordPress“

ActivityPub for WordPress erweitert WordPress um einige Fediverse-Funktionen, konkurriert aber nicht mit Plattformen wie Friendica oder Mastodon. Wenn du ein dezentrales Social Network betreiben möchtest, verwende bitte Mastodon oder GNU social.

Was, wenn dein Blog in einem Unterverzeichnis deines Webservers liegt?

Damit webfinger funktioniert, muss es auf das Stammverzeichnis der URL abgebildet werden, auf der sich Dein Blog befindet.

Apache

Füge folgendes zur .htaccess-Datei im Hauptverzeichnis hinzu:

RedirectMatch "^\/\.well-known/(webfinger|nodeinfo|x-nodeinfo2)(.*)$" "\/blog\/\.well-known$1$2"

Wobei ‚blog‘ der Pfad zu dem Unterverzeichnis ist, in dem sich Dein Blog befindet.

Nginx

Füge der site.conf in sites-available Folgendes hinzu:

location ~* /.well-known {
    allow all;
    try_files $uri $uri/ /blog/?$args;
}

Wobei ‚blog‘ der Pfad zu dem Unterverzeichnis ist, in dem sich Dein Blog befindet.

Rezensionen

29. April 2023
This plugin is absolutely fabulous. I had never expected that connecting my WordPress site to the Fediverse would be SO SIMPLE. However, one thing surprised me. In the settings, the default is that it posts your 'full content' of your post to the Fediverse, rather than the more logical 400-character 'excerpt' Mastodon users won't be happy with getting posts of sometimes thousands of characters in their feed. I therefore suggest making 'excerpt' the default and people can choose 'full content' if they really wish that.
19. Januar 2023 1 Antwort
The indieweb and fediverse communities are doing great work and need to be acknowledged this plugin works well and the devs are constantly improving it
12. Januar 2023
With this plugin your posts appear automatically on Mastodon. Replies on Mastodon becomes comments on your post. Really, it couldn't be easier.
1. Januar 2023
Was able to subscribe to my WP weblog from Mastodon, post, and then all the replies went back as comments to my weblog post. Just lovely.
15. Dezember 2022 3 Antworten
<p>I am changing my review because not only has the issue of what to do if your blog is in a subdirectory been solved, but the solution is a tiny simple little snippet of code. This is now within reach for the vast majority. Now that it is working, it works like a dream. Anybody who has to manage multiple social media presences should use this, and even if you just have one, this takes a few steps off your to-do list and will save you lots of time. Definitely install this on your site. BTW, this is also good because you really want to nurture your relationship with federated platforms. If you're concerned about both free speech for real and fighting the spread of disinformation, federated platforms are the present and the future.  Support this. Spend on this. Seriously.</p>
Alle 15 Rezensionen lesen

Mitwirkende & Entwickler

„ActivityPub“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„ActivityPub“ wurde in 12 Sprachen übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „ActivityPub“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

Project maintained on GitHub at automattic/wordpress-activitypub.

1.0.0

  • Add: blog-wide Account (catchall, like example.com@example.com)
  • Add: a Follow Me block (help visitors to follow your Profile)
  • Add: Signature Verification: https://docs.joinmastodon.org/spec/security/
  • Add: a Followers Block (show off your Followers)
  • Add: Simple caching
  • Add: Collection endpoints for Featured Tags and Featured Posts
  • Add: Better handling of Hashtags in mobile apps
  • Update: Complete rewrite of the Follower-System based on Custom Post Types
  • Update: Improved linter (PHPCS)
  • Compatibility: Add a new conditional, \Activitypub\is_activitypub_request(), to allow third-party plugins to detect ActivityPub requests
  • Compatibility: Add hooks to allow modifying images returned in ActivityPub requests
  • Compatibility: Indicate that the plugin is compatible and has been tested with the latest version of WordPress, 6.3
  • Compatibility: Avoid PHP notice on sites using PHP 8.2
  • Fixed: Load the plugin later in the WordPress code lifecycle to avoid errors in some requests
  • Fixed: Updating posts
  • Fixed: Hashtag now support CamelCase and UTF-8

0.17.0

  • Fix type-selector
  • Allow more HTML elements in Activity-Objects

0.16.5

  • Return empty content/excerpt on password protected posts/pages

0.16.4

  • Remove scripts later in the queue, to also handle scripts added by blocks
  • Add published date to author profiles

0.16.3

  • „cc“, „to“, … fields can either be an array or a string
  • Remove „style“ and „script“ HTML elements from content

0.16.2

  • Fix fatal error in outbox

0.16.1

  • Fix „update and create, posts appear blank on Mastodon“ issue

0.16.0

  • Add „Outgoing Mentions“ (#213) props @akirk
  • Add configuration item for number of images to attach (#248) props @mexon
  • Use shortcodes instead of custom templates, to setup the Activity Post-Content (#250) props @toolstack
  • Remove custom REST Server, because the needed changes are now merged into Core.
  • Fix hashtags (#261) props @akirk
  • Change priorites, to maybe fix the hashtag issue

0.15.0

  • Enable ActivityPub only for users that can publish_posts
  • Persist only public Activities
  • Fix remote-delete

0.14.3

  • Better error handling. props @akirk

0.14.2

  • Fix Critical error when using Friends Plugin and adding new URL to follow. props @akirk

0.14.1

  • Fix „WebFinger not compatible with PHP < 8.0“. props @mexon

0.14.0

  • Friends support: https://wordpress.org/plugins/friends/ props @akirk
  • Massive guidance improvements. props mediaformat & @akirk
  • Add Custom Post Type support to outbox API. props blueset
  • Better hash-tag support. props bocops
  • Fix user-count (NodeInfo). props mediaformat

0.13.4

  • fix webfinger for email identifiers

0.13.3

  • fix: Create and Note should not have the same ActivityPub ID

0.13.2

  • fix Follow issue AGAIN

0.13.1

  • fix Inbox issue

0.13.0

  • add Autor URL and WebFinger health checks
  • fix NodeInfo endpoint

0.12.0

  • use „pre_option_require_name_email“ filter instead of „check_comment_flood“. props @akirk
  • save only comments/replies
  • check for an explicit „undo -> follow“ action. see https://wordpress.org/support/topic/qs-after-latest/

0.11.2

  • fix inconsistent %tags% placeholder

0.11.1

  • fix follow/unfollow actions

0.11.0

0.10.1

  • fix inbox activities, like follow
  • fix debug

0.10.0

  • add image alt text to the ActivityStreams attachment property in a format that Mastodon can read. props @BenLubar
  • use the „summary“ property for a title as Mastodon does. props @BenLubar
  • support authorized fetch to avoid having comments from „Anonymous“. props @BenLubar
  • add new post type: „title and link only“. props @bgcarlisle

0.9.1

  • disable shared inbox
  • disable delete activity

0.9.0

  • some code refactorings
  • fix #73

0.8.3

  • fixed accept header bug

0.8.2

  • add all required accept header
  • better/simpler accept-header handling
  • add debugging mechanism
  • Add setting to enable AP for different (public) Post-Types
  • explicit use of global functions

0.8.1

  • fixed PHP warnings

0.8.0

  • Moved followers list to user-menu

0.7.4

  • added admin_email to metadata, to be able to „Manage your instance“ on https://fediverse.network/manage/

0.7.3

  • refactorings
  • fixed PHP warnings
  • better hashtag regex

0.7.2

  • fixed JSON representation of posts https://merveilles.town/@xuv/101907542498716956

0.7.1

  • fixed inbox problems with pleroma

0.7.0

  • finally fixed pleroma compatibility
  • added „following“ endpoint
  • simplified „followers“ endpoint
  • fixed default value problem

0.6.0

  • add tags as hashtags to the end of each activity
  • fixed pleroma following issue
  • followers-list improvements

0.5.1

  • fixed name-collision that caused an infinite loop

0.5.0

  • complete refactoring
  • fixed bug #30: Password-protected posts are federated
  • only send Activites when ActivityPub is enabled for this post-type

0.4.4

  • show avatars

0.4.3

  • finally fixed backlink in excerpt/summary posts

0.4.2

  • fixed backlink in excerpt/summary posts (thanks @depone)

0.4.1

  • finally fixed contact list

0.4.0

  • added settings to enable/disable hashtag support
  • fixed follower list
  • send activities only for new posts, otherwise send updates

0.3.2

  • added „followers“ endpoint
  • change activity content from blog ‚excerpt‘ to blog ‚content‘

0.3.1

  • better json encoding

0.3.0

  • basic hashtag support
  • temporarily deactivated likes and boosts
  • added support for actor objects
  • fixed encoding issue

0.2.1

  • customizable backlink (permalink or shorturl)
  • show profile-identifiers also on profile settings

0.2.0

  • added option to switch between content and excerpt
  • removed html and duplicate new-lines

0.1.1

  • fixed „excerpt“ in AS JSON
  • added settings for the activity-summary and for the activity-object-type

0.1.0

  • added basic WebFinger support
  • added basic NodeInfo support
  • fully functional „follow“ activity
  • send new posts to your followers
  • receive comments from your followers

0.0.2

  • refactoring
  • functional inbox
  • nicer profile views

0.0.1

  • initial