Skip to content
  • 🆕 blog!

    General Discussion activitybot activitypub mastodon php
    3
    0 Votes
    3 Posts
    10 Views
    tim_lavoie@cosocial.caT
    @Edent @openbenches @colours That's fun! I just snagged Evan's ActivityPub book, so thoughts of random AP client bots bounced around my head as well.
  • 0 Votes
    1 Posts
    10 Views
    blog@shkspr.mobiB
    Some updates to ActivityBot https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/ I couple of years ago, I developed ActivityBot - the simplest way to build Mastodon Bots. It is a single PHP file which can run an entire ActivityPub server and it is less than 80KB.It works! You can follow @openbenches@bot.openbenches.org to see the latest entries on OpenBenches.org, and @colours@colours.bots.edent.tel for a slice of colour in your day, and @solar@solar.bots.edent.tel to see what my solar panels are up to.This is so easy to use. Copy the PHP file (and a .env and .htaccess) to literally any web host running PHP 8.5 and you have a fully-fledged bot which can post to Mastodon.Grab the code and start today!FeaturesOver the years I've added a few more features to it, so I thought I'd run through what they are. Note, this is all hand-written. No sycophantic plagiarism machines were involved in this code or blog post. I just really like emoji, OK Be discovered on the FediverseThis is the big one, you can find @example@example.viii.fi on your favourite Fediverse client. This is thanks to its WebFinger support. Be followed by other accountsNo point being discovered if you can't be followed. This accepts follow requests and sends back a signed accept. Be unfollowed by accountsSometimes people want to unfollow. Too bad, so sad. Again, this will accept the undo request and delete the unfollowing user's information. Send messages to the FediverseIf a bot can be followed, but never posts, does it make a sound? This sends a post to all of your followers' (shared) inboxes. Includes some HTML formatting. Send direct messages to usersNot every message is for the wider public. If you want a bot which sends you a private message, this'll set the visibility correctly. Attach images & alt text to a message A picture is worth a thousand words. But those pictures are meaningless without alt text. Attach as many images as you like. Note, most Mastodon services only accept a maximum of four. Video Upload No transcoding or anything fancy. Upload a video and it'll be sent to your followers. Audio Upload Same as video. Raw audio posted to your followers' feeds. Autolink URls, hashtags, and @ mentionsIncluding URls, tags, and mentions are mostly autolinked correctly. There's a lot of fuzziness in how it works.đŸ§” ThreadsYou can reply to specific messages in order to create a thread. Follow, Unfollow, Block, and Unblock other accountsIt might be useful for you to remove followers or follow specific accounts. Delete posted messages and their attachments We all make mistakes. This will delete your post along with any attachments and send that delete message to everyone. Note, because of the federated nature of the Fediverse, you cannot guarantee that a remote server will delete anything. Edit Posts If you don't want to delete and re-post, you can edit your existing posts. Bridge to BlueSky with your domain name via Bridgy FedNot everyone is on the Fediverse. If you want to bridge to BlueSky, you can use the Bridgy Fed service. Move followers from an old account and to a new account Perhaps you started as @electric@sex.pants but now you want to become @chaste@nunslife.biz - no worries! You can tell followers you've moved and what your new name is.Similarly, if ActivityBot is no longer right for you, it's simple to tell your existing follower to move to your new account. Allow quote posts Rather than just reposting your message, this sets the quote policy to allow people to share your message and attach some commentary of your own. Show followersYour follower count isn't just a number, it is a living list of who chooses to follow you. Content Warnings Perhaps you want to hide a bit of what you're saying. Add a content warning to hide part of your message. Verify cryptographic signaturesHTTP Message Signatures is hard. I think I've mostly got it sorted.đŸȘ” Log sent messages and errorsThis is primarily a learning aide, so have a rummage through the logs and see what's going on. Clear logs when there are too manyActivityPub is a chatty protocol. Your server can easily fill up with hundreds of thousands of messages from others. This regularly prunes down to something more manageable.#ïžâƒŁ Hashed passwords for posting Bit of a guilty moment here. I was originally storing the password in plaintext. Naughty! Passwords are now salted and hashed. Basic website for showing postsA nice-enough looking front end if people want to view the posts directly on your domain.Some DeficienciesNot every piece of software is perfect. ActivityBot is less perfect than most things. Here are some of the things it can't do and, perhaps, will never do. If you'd like to help tackle any of these, fork the code from my git repo! Retry Failed MessagesA proper Mastodon server will keep trying to send messages to unresponsive hosts. ActivityBot is one-and-done. If a remote server didn't respond in time, or was offline, or something else went wrong - it may not get the message. Reposts / Announce / QuoteYou cannot boost other posts, or even your own. Nor can you send quote posts. Act On InstructionsThis is a basic bot. It contains no logic. If you send it a message asking it to take action, it will not. You will need to build something else to make it truly interactive. Receive MessagesIn fact, other than the follow / unfollow stuff, the bot can't receive any messages from the Fediverse. It doesn't know when a post has been replied to, liked, or reposted. Set Post VisibilityYour posts are either public or a DM. There's no support for things like quiet followers. Create PollsEveryone loves to vote on meaningless polls - but this is quite a hard problem for ActivityBot. It would need to keep track of votes, prevent double voting, and probably some other difficult stuff. Change Quote Post VisibilityAs quote posts are still quite new to Mastodon, I'm not sure how best to implement this. Proper HTML / Markdown SupportAutolinking names, hashtags, and links just about works - but not very reliably. In theory the bot could parse Markdown and create richly formatted HTML from it. But that may require an external library which would bloat the size. Perhaps posting raw HTML could work? Focus Points for ImagesPerhaps of less use now, but still of interest to people? Other StuffI don't know what I don't know. Maybe some stuff is total broken? Maybe it is wildly out of spec? If you spot something dodgy, please let me know or raise a Pull Request. #ActivityBot #ActivityPub #mastodon #php
  • 0 Votes
    5 Posts
    6 Views
    liaizon@social.wake.stL
    @naturzukunft2026 oh wonderful yes this is a big upgrade. There are a few things that are a bit broken/wonkey but all and all much better then before!
  • 0 Votes
    3 Posts
    13 Views
    ggrey@social.thelab.unoG
    @RxBrad I guess that's your own hosted ActivityPub but I was trying to rely on the Ghost ones and preferred not to go down that route. Thanks anyway pal
  • 0 Votes
    4 Posts
    12 Views
    julian@activitypub.spaceJ
    @hrefna@hachyderm.io years ago, I helped move a Star Trek PBeM to NodeBB. It didn't take off, but the concept is solid. @badtuple@mastodon.social if you know of any PbP admins looking to migrate I'd be happy to help.
  • 0 Votes
    1 Posts
    8 Views
    reeeen@norden.socialR
    Kleines Fediverse-Gedankenexperiment fĂŒr den Abend: Bei Twitter/X verlierst du deinen Account → alles weg. Im Fediverse ziehst du einfach die Instanz um und nimmst deine Follower mit. Als ob du umziehst und deine Telefonnummer behalten kannst – egal bei welchem Anbieter. Das nennt sich PortabilitĂ€t. Wildeste Idee: Technologie die fĂŒr Nutzer:innen funktioniert #Fediverse #Mastodon #Dezentral #ActivityPub
  • 0 Votes
    10 Posts
    9 Views
    paul@oldfriends.liveP
    @FinchHaven Thanks for chiming in. I appreciate it.
  • 0 Votes
    1 Posts
    7 Views
    mfeilner@mastodon.socialM
    Hey #fediverse #activitypub #mastodon #opensource who else is in beautiful #Amsterdam this week? Love to meet you there! @FediVariety @chillicampari @vnhttps://www.fedivariety.org/unconference
  • 0 Votes
    1 Posts
    1 Views
    vincentbreton@piaille.frV
    en revenant sur le site, je me suis rappelé le besoin de veiller toujours à la cohérence #likes #fediverse #webmentions #activitypub https://vincentbreton.fr/ce-qui-compte-ce-sont-les-liens-pas-les-likes/
  • 0 Votes
    1 Posts
    4 Views
    reeeen@norden.socialR
    Spaßige Fediverse-Beobachtung des Tages: Wenn du auf Mastodon fragst „Welche Instanz soll ich nehmen?" kriegst du 47 durchdachte, freundliche Antworten. Wenn du dasselbe auf Twitter/X fragst
 naja. Das liegt ĂŒbrigens nicht an Zufall – dezentrale Netzwerke ziehen andere Communities an, weil die Plattformstruktur selbst das Verhalten formt. Algorithmen ≠ neutral.#Fediverse #Mastodon #Dezentralisierung #ActivityPub
  • 0 Votes
    2 Posts
    13 Views
    secondchancelemon@rebel.arS
    @josemurilo i love that acronym
  • 0 Votes
    1 Posts
    9 Views
    hongminhee@hollo.socialH
    Update: we've decided to go ahead and submit the CFP to @COSCUP@floss.social 2026. The track will be called Fediverse & Social Web—think FOSDEM's Social Web devroom, but in Taipei. #COSCUP is free to attend, like FOSDEM. If the track is accepted, would you be interested in coming to Taipei (Aug 8–9) to give a talk? (Boosts appreciated!) https://hollo.social/@hongminhee/019ca8b2-ecca-7150-a237-37f35de45401 #fedidev #fediverse #SocialWeb #ActivityPub
  • 0 Votes
    19 Posts
    5 Views
    johannab@cosocial.caJ
    @theraccoonbytes @mapache @samnabi a large part of the point I'm trying to make is that we can do this within borders, with a commitment to local hosting and local support, but with access to the global base of fediverse software and collaborative reach globally.But my vision for "verification" is more like the financial industry's "KYC" - an identifyable org and/or certified professional vouches for someone by an auditable process. Badgefed + Fediprofile seems a great digital schema for it
  • 0 Votes
    6 Posts
    8 Views
    secretladya@mstdn.socialS
    @stib Instance perhaps, but more likely to be due to the application used to integrate with the Fediverse, on the native webapps (for mastodon) the booster handle is NOT included when I hit reply on the boosted tootMight be a difference between Mastodon, GoToSocial, Pixelfed etc apps as well, how that software handles boosts, there are a lot projects that interact with the Fediverse in similar but still different ways
  • 0 Votes
    1 Posts
    1 Views
    vincentbreton@piaille.frV
    AprÚs l'entrée dans le #fediverse et l'apprentissage d'#activitypub , je découvre maintenant les #webmentions https://vincentbreton.fr/webmentionnons-nous-les-uns-les-autres/
  • 0 Votes
    1 Posts
    5 Views
    vbreton@vincentbreton.frV
    Le site vient de rejoindre il y a peu le FĂ©diverse (fĂ©dĂ©ration d’univers, de rĂ©seaux, de serveurs indĂ©pendants capables de communiquer entre eux). Dans l’idĂ©e d’approfondir notre indĂ©pendance vis Ă  vis des gĂ©ants du Web, je me suis intĂ©ressĂ© aux webmentions. Et quand je dis « webmentionnons-nous les uns les autres », c’est une façon de nous inviter, auteurs de sites et de blogs Ă  mieux nous relier quand nous nous citons. Webmention ? Webmention ? Est-ce que j’ai une gueule de webmention ? Imaginez que vous Ă©criviez un article sur votre blog ou votre site. Moi ou un autre autre auteur le cite dans le sien. En gĂ©nĂ©ral on met le lien. Quand on a le temps, on prĂ©vient. C’est rare.Sauf Ă  tomber dessus par hasard en vous cherchant vous-mĂȘme dans un moteur de recherche, vous ne le sauriez jamais.Avec les webmentions, le site qui vous cite (si, si !) vous envoie automatiquement une petite notification. Cette notification va figurer dans l’article du lien concernĂ©. Si vous le voulez, si vous l’approuvez. Cette mention va permettre de crĂ©er du lien entre les deux sites. Si on se cite c’est qu’on a des intĂ©rĂȘts en commun et donc des lectrices et lecteurs qui pourraient s’intĂ©resser Ă  nos Ă©crits rĂ©ciproques. Je l’avais un peu fait ici avec les curiositĂ©s numĂ©riques par exemple. Ce dispositif s’appuie sur un standard ouvert du web, propre, Ă©lĂ©gant, et qui existe depuis pas mal d’annĂ©es je crois (2017 ?) .Du lien et de la vieDu lien entre sites qui entrent dans le mĂȘme esprit. Et toujours avec respect, Ă©thique, tout ça. Pour une autrice ou un auteur qui publie sur WordPress et partage ses articles sur Mastodon, c’est particuliĂšrement intĂ©ressant. Quand quelqu’un rĂ©pond au post sur Mastodon cette rĂ©ponse peut remonter automatiquement dans les commentaires de votre article WordPress.C’est le site qui est votre espace, votre espace central et se relie aux autres sites et blogs, Ă  Mastodon, au FĂ©diverse
Les conversations convergent vers les pages concernĂ©es plutĂŽt que de se perdre dans les limbes.C’est la philosophie IndieWeb : possĂ©der ses contenus, relier les conversations, ne pas dĂ©pendre des plateformes. Y a plus qu’à !AprĂšs avoir installĂ© ActivityPub, j’ai trouvĂ© ça facile. Étape 1: Installer le plugin Webmention On installe Webmention le plugin de Matthias Pfefferle (merci ! c’est simple et gratuit) . C’est lui qui a dĂ©veloppĂ© ActivityPub. On active, on renseigne un petit texte pour le bloc qui viendra sous les commentaires. J’en ai mis un en français.Étape 2 : VĂ©rifier les paramĂ©trages des commentaires Ils doivent ĂȘtre activĂ©s. Je le fais sans cookie ici. Pas de suivi. Les webmentions arrivent dans la file des commentaires WordPress. Il est mieux de vĂ©rifier que l’approbation manuelle est activĂ©e. On n’est pas lĂ  pour se faire engueuler !Étape 3 : On se connecte Ă  Bridgy Bridgy est un service gratuit qui fait le pont entre votre compte Mastodon et votre site. Sans lui, les rĂ©ponses Mastodon resteraient sur Mastodon et n’arriveraient jamais chez vous. Ce que vous pouvez aussi prĂ©fĂ©rer. Dans ce cas, passer Ă  l’étape 5.Sur brid.gy, con choisit « Cross-post to a Mastodon account », il faut autoriser la connexion avec le compte Mastodon, et c’est tout. Bridgy commence Ă  surveiller vos posts et transmet les rĂ©ponses vers votre site sous forme de webmentions. Il tourne en arriĂšre-plan mais par « vagues » si j’ai bien compris. Étape 4 : lancer « crawl now »sur BridgyBridgy va explorer le site et remonte l’historique rĂ©cent de vos Ă©changes Mastodon. Étape 5 : on gĂšre les webmentions dans les commentaires. Les webmentions sont lĂ , mĂ©langĂ©es aux commentaires classiques mais on voit qui a Ă©crit ou ce qu’il ou elle a fait (aimer, partager
). Comme nos propres messages vont venir, il faut les Ă©liminer pour Ă©viter l’impression de se citer soi-mĂȘme
Dans cette Ă©tape viendront aussi les mentions d’autres sites qui Ă©quipĂ©s du mĂȘme plugin vont vous envoyer des petits signaux automatiques
 Mais il est possible d’inscrire le lien dans le petit bloc que vous voyez sous les commentaires. Il y a encore Ă  chercher oĂč traduire certains termes, mais je pense le faire Ă  terme
Les mentions lĂ©galesPuisque vous allez afficher sur votre site des contenus provenant d’autres personnes, pensez Ă  le mentionner dans vos mentions lĂ©gales. Il faut prĂ©ciser que le site reçoit des webmentions, que ce sont des donnĂ©es publiques soumises Ă  modĂ©ration, et qu’on peut vous demander le retrait d’une mention via votre formulaire de contact.Une façon de prendre la mainC’est modeste, pas bouleversant mais se dĂ©marque des liens qu’on trouve ailleurs par exemple vers Facebook ou autres X et qui non seulement nourrissent la « bĂȘte » mais surtout exposent au vol de donnĂ©es
 Ces approches sont encore minoritaires, mais les outils sont lĂ . Je n’ai rien codĂ©, j’ai suivi ce que j’ai lu et certainement il y aura des choses Ă  amĂ©liorer encore mais je trouve ça intĂ©ressant Ă  expĂ©rimenter notamment pour la dimension humaine que ça permet de valoriser.
  • 0 Votes
    1 Posts
    1 Views
    jorge@social.jagedn.devJ
    Qué maravilla !!!Me estoy haciendo una implementacion de #Activitypub en #Java #Micronaut desde ceroacepta Follow/UnFollow y encima te saluda!!
  • 0 Votes
    2 Posts
    0 Views
    benpate@mastodon.socialB
    @Profpatsch Cool idea. Apple does something similar with their App Store payments. You buy a bunch of things and they hold the charges for a day or two, then charge it all at once.It would be more difficult in a decentralized environment, though, if I’m aggregating charges for/from many different people.
  • 0 Votes
    1 Posts
    13 Views
    rick@rmendes.netR
    @HolosDiscover@discover.holos.social follow https://rmendes.net/notes/2026/03/14/7987c
  • 0 Votes
    1 Posts
    2 Views
    sberson@app.wafrn.netS
    "the Fediverse is all interoperable & interconnected!" - me needing multiple apps & multiple accounts to view & post to the micro-blogs, the long form blogs, the link aggregators, event sharers, and the media sharers - ummm not really. The Fedi marketers need to stop misleading folks, platform interconnectedness for lots of stuff is either just starting in small ways or is nonexistent, and is subject to the fact that no single app is designed to handle all paradigms, and if it did try to handle lots of them, would be an enormously complicated and heavyweight piece of software (e.g. witness the public Friendica instance I was on getting shutdown due to the ongoing costs & maintenance time for it being too high for the instance owner to want to continue it; as well as witness how cluttered & clunky some of its interface is). That said, I am really digging Wafrn, in that it unifies both the Fediverse micro-blogs along with Bluesky, and it also allows out of the box to make long posts with markdown formatting too. Good stuff. #socialmedia #mastodon #activitypub #fediverse #interoperable #interconnected #marketinglies #wafrn