Ich war am Wochenende auf dem CloudFest Hackathon und hatte zum zweiten Mal die Change ein Projekt zu betreuen. Die Idee zu „Enable Mastodon Apps“ stammt von @alex und ich freue mich sehr, dass er mir sein „Baby“ für den Hackathon anvertraut hat!
Hier ist unser Pitch:
Hier klicken, um den Inhalt von YouTube anzuzeigen. Erfahre mehr in der Datenschutzerklärung von YouTube.
var _oembed_068c0c63330a5645737b81421ea55b3e = ‘{“embed”:”<iframe title="Enable Mastodon Apps for WordPress and its Plugins" width="900" height="506" src="https:\/\/www.youtube-nocookie.com\/embed\/VJWdzeZz-ok?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen><\/iframe>”}’;
Das Nachbauen der Mastodon-API stellt eine relativ einfache Lösung für das aktuelle ‚App-Problem‘ von WordPress dar. Die gängigen Apps zielen darauf ab, den Nutzern das traditionelle Bloggen zu ermöglichen. Allerdings haben soziale Medien im Allgemeinen und Twitter im Speziellen, die Art und Weise wie wir im Internet kommunizieren, maßgeblich verändert. Es geht nicht mehr um lange Artikel, sondern um kurze Nachrichten ohne Titel mit dem Fokus auf Bilder oder Videos.
Ein weiterer Nebeneffekt sind die sozialen Interaktionen wie Kommentieren (die WordPress über die letzten Jahre spärlich vernachlässigt hat), Liken, Boosten und Bookmarken (die WordPress nativ gar nicht unterstützt), welche die Mastodon Apps von Haus aus schon mit bringen.
Das Projekt hat mich sehr an die frühen Twitter-Jahre erinnert. Die Twitter-API galt lange als der de-facto Standard für Micro-blogging und Automattic/@photomatt hat damals schon die Vorteile für sich erkannt und die API für WordPress.com nach gebaut:
Of course one of the coolest things about Twitter right now is the client applications, particularly the mobile/iPhone ones. I use Tweetie 2 on my iPhone every day. Wouldn’t it be cool if you could get all your blog subscriptions and post to your WordPress.com blog from apps like Tweetie? Well here’s an early Christmas present…
We’ve enabled posting to and reading of WordPress.com blogs via the Twitter API. Any app that allows you to set a custom API URL will work.
Vielen Dank auch an @bart und das Team von Mammoth, die uns im Vorfeld unterstützt haben. Mammoth funktioniert jetzt wunderbar mit WordPress und Alex und ich hatten einen Einblick in die App-Entwicklung und deren Eigenheiten 🙂
I’ve created the WordPress plugin called Enable Mastodon Apps which does a seemingly small but powerful thing: it enables you to access your WordPress blog using Mastodon apps like Tusky or Ivory. This can be used to browse your own blog and post to it. If you also have the Friends plugin and the ActivityPub plugin installed, this will actually make your WordPress blog behave like a Mastodon instance.
It does this be re-implementing the Mastodon API (unfortunately, Mastodon didn’t opt to implement the ActivityPub client-server API so this is not based on a standard) which can be tricky: it uses REST API endpoints in the (virtual) directories /oauth and /api which are so generic that they are prone to conflicts.
Additionally, although the API is well documented, many apps were created based on assumptions that are true for Mastodon itself (which caused a lot–sometimes hard to reproduce–of issues for the plugin). For example, the id of a post or a user is defined as a string but many apps crash when you put a non-number there. Or that a boosted toot needs to have a different id than the virtual “wrapping” toot (Ivory!). In such cases, apps would crash but work fine with Mastodon itself.
Even more complicated are interactions with other WordPress plugins. It can be hard to understand if the plugin is working correctly, if another plugin is interfering, the hosting provider acts quirky, or if the Mastodon app has an incompatibilty with my implementation.
I hope that this tool will help identify issues better in future, it can also be used with GotoSocial or a “real” Mastodon instance. Feel free to report issues you might encounter.