Crediting your own website when syndicating to Mastodon with WordPress plugins

I’ve been tinkering around with methods to automatically syndicate (POSSE) content from my personal website to Mastodon. I’ve been working at making a custom plugin which is far from finished. But a test post I made the other day, caught a few people’s attention[1][2]

I was trying to syndicate from my website so that the post on Mastodon would credit my website for the post and link back to my homepage as the application that made the post. You’ll notice at the bottom of the post there’s the post date and a globe icon, which indicates the post is public, followed by my website name ‘BoffoSocko.com’ and details about replies, reposts, and favorites.

screen capture of a Mastodon post which gives credit to Boffosocko.com at the bottom of the post.

I assuredly won’t release a public plugin for WordPress that does this. But since some have asked how I did it, I thought I’d share some of the internals of a few WordPress plugins that one can quickly modify to achieve the same thing.

That I can currently see, there are three plugins in the repository that will allow one to syndicate content to a variety of Mastodon instances. They are Mastodon Autopost, Mastodon Auto Share, and Share on Mastodon. The first two are closely related and essentially replicate the same codebase.

Similar to using Twitter’s API to crosspost, Mastodon is looking for two bits of information when an application is registered: a client name and a website URL. 

Mastodon Autopost and Mastodon Auto Share, both have a file called client.php which define these two variables. 

public function register_app($redirect_uri) {
  $response = $this->_post('/api/v1/apps', array(
    'client_name' => 'Mastodon Share for WordPress',
    'redirect_uris' => $redirect_uri,
    'scopes' => 'write:statuses write:media read:accounts',
    'website' => $this->instance_url
  ));

You can edit this file with a text editor to change the 'client_name' from 'Mastodon Share for WordPress' to 'Anything You Want'. If you’re in a joking mood, maybe change it to 'Twitter'?

To change the URL so that the link on the client_name directs to your website, you’ll want to change the line 'website' => $this->instance_url.

In particular change $this->instance_url to 'https://example.com' where example.com would be your website. I’ll note that $this->instance_url on this line in the original plugin is a bug. If left alone, it points the URL to your home Mastodon instance instead of to the more logical https://wordpress.org/plugins/autopost-to-mastodon/ where the plugin lives. 

If you prefer using Jan Boddez‘ excellent plugin, you’ll want to do something similar, except in that case you’ll want to change a file named class-options-handler.php in the includes folder.

Here you’ll want something like:

'client_name'   => __( 'Example.com' ),

But note that Boddez doesn’t have a similar bug, so the website line

'website' => home_url(),

is already correctly defined so that your website will automatically be linked without any changes to it.

If you’re already using one of these plugins and manually modify them, note that you’ll probably need to re-authorize the plugin so that the changes propagate.

Quoted a tweet by Amy CollierAmy Collier (Twitter)
There are some great resources and material here. Signing up today.
Replied to a tweet (Twitter)
The original Press This spun itself off as a stand-alone plugin, so look there first to recreate its functionality. If that doesn’t suit, try David Shanske’s Post Kinds plugin which incorporates a lot of Press This functionality and extends it quite a bit. You can create bookmarklets with it that work well (including mobile).

Another option is Tom Critchlow and Toby Shorin’s Quotebacks which you might leverage though they won’t necessarily create new posts on your behalf.

If you’ve got some programming experience, you might be able to do something interesting with a set of bookmarklets I just made too.

I think I’ve also shared most of my documented workflow for using Hypothes.is for some of this too, though that may require some work on your behalf.

Another good option is to add Micropub functionality and use some clients like Quill, Omnibear, or others in conjunction with the Post Kinds plugin. I think Quill may also have some useful bookmarklets you can use with it as well.

Replied to Tags vs labels by Amit (amitp.blogspot.com)

But are “labels” and “tags” the same thing?

A long time ago, I read that they're different. The distinction as described was:

  • “labels” are when you mark your own content (first party)
  • “tags” are when you mark other people's content (third party)
I like the framing you’ve made in the definition of “label” and “tag”. I wish the distinction was respected by a broader range of people and programs as it could be more useful that way.

I’ve mentioned a subtle way of doing this on my site before: 

I also find that I have a subtle differentiation using singular versus plural tags which I think I’m generally using to differentiate between the idea of “mine” versus “others”. Thus the (singular) tag for “commonplace book” should be a reference to my particular commonplace book versus the (plural) tag “commonplace books” which I use to reference either the generic idea or the specific commonplace books of others. Sadly I don’t think I apply this “rule” consistently either, but hope to do so in the future.

Now I’m wishing that I had a separate “labels” taxonomy on my site to distinguish between “mine” and “theirs”. In using the Post Kinds Plugin for WordPress, I’m passively collecting labels (though it’s called tags) others put on their content (which is currently hidden in my internal metadata) and that is separate from the metadata tags I place on it. Being able to separately search the two could be a powerful feature.

Ryan Barrett in bookmark of Amit’s Thoughts: Tags vs labels ()

The real super-power feature missing from Roam Research?

My public Roam Research notebook being able to converse with someone elses’ (or any other page on the internet for that matter). Webmention support might solve this.

(See also related conversation at https://boffosocko.com/2020/12/09/55782252/)

Browser Bookmarklets for Giving Credit

I’ve been thinking more lately about giving credit on my own website, particularly in cases where the context of things I’m reading has some additional context based on where I originally saw them. I’d also like to give people I follow credit as the source by which my own content is aggregated.

Earlier today I tinkered around with some ideas relating to the old Curator’s Code which I revisit from time to time. I outlined some details, data fields, UI, and some pseudo-code to actually build it into a WordPress plugin. Then I thought I ought to check the repository where I discovered that someone had previously made one. Unfortunately it was withdrawn from the repository. I suspect its that they didn’t want to continue to support it moving into the Gutenberg era. (It still works with the classic editor.)

I don’t give credit on my site often enough in large part because it isn’t an easier thing to do when quickly posting some of the smaller bits of content. They say “manual until it hurts“, and doing this has just hurt too much for too long. Toward that end I thought I’d make a couple of quick bookmarklets for cutting and pasting text into my site. It’s not as good as a better custom UI, but it’ll work and could potentially work well for others.

These bookmarklets aren’t any great shakes and perhaps (hopefully?) someone with more JavaScript chops than I have can greatly improve upon them to add or modify some of the bits and automate things a bit better. In particular, I’m sure there’s a way to find the original publication date on a page and pull that data out, but currently I could only figure out how to find the last modified date using document.lastModified because I couldn’t find the other. I’d also prefer to have a way to automatically find the author(s) as well, but JS isn’t my best friend.

Instructions for use

Create two bookmarks in your browser’s bookmark bar. Give them convenient names like “via” and “hat tip” and add the snippets of code respectively into the URL fields. On a site you want to give credit to, highlight the name of the author of the post and click the bookmarklet. You’ll see a pop up for some text which you can then cut and paste into your post to give the credit. You can obviously edit the text if necessary.

If your site supports sending Webmention notifications, then when the post is published, the cited page will get a notification of your post.

Bookmarklet code

Below are snippets of code that the bookmarklets are running (for transparency’s sake).

javascript:(function(){let text=""; if(window.getSelection()!=''){text=window.getSelection().toString()+"\n";}prompt("Press Ctrl+C, Escape","<p><small><cite class="h-cite via"><abbr title="via">ᔥ</abbr> <span class="p-author h-card">"+text+"</span> in <a class="u-url p-name" href=""+location.href+"" target="_blank" rel="noopener noreferrer" >"+document.title+"</a> (<time class="dt-published">"+document.lastModified+"</time>)</cite></small></p>");})()
javascript:(function(){let text=""; if(window.getSelection()!=''){text=window.getSelection().toString()+"\n";}prompt("Press Ctrl+C, Escape","<p><small><cite class="h-cite ht"><abbr title="hat tip">↬</abbr> <span class="p-author h-card">"+text+"</span> in <a class="u-url p-name" href=""+location.href+"" target="_blank" rel="noopener noreferrer" >"+document.title+"</a> (<time class="dt-published">"+document.lastModified+"</time>)</cite></small></p>");})()

Example

Here’s an example of what it looks like on my site:

 Maria Popova with input from Tina Roth Eisenberg in curator’s ǝpoɔ ()

Who will you credit?

Lemmy, a clever-looking link/conversation hub

Christine’s recent note that she was only getting webmentions from Lobsters and her update with a webmention example from Maya reminded me about the coolness that is Lemmy, a link aggregator for the Fediverse. I notice that Maya often syndicates her content there. 

I haven’t looked deeply into Lemmy’s internals yet. It looks like it has a similar community/aggregation hub functionality that Lobsters and Reddit has. It also looks like it functions like news.indieweb.org or indieweb.xyz. One thing I’d be curious to know is if Maya and gang has any plans for Lemmy to allow users to receive webmentions to comments on their posts on Lemmy. Lobsters implemented this in 2018. Or, with a bit more work, they might allow people to post to Lemmy using Webmention as a syndication mechanism the way indieweb.xyz or news.indieweb.org do.

Of course it looks like they might also benefit from IndieAuth login so that other accounts in the Fediverse might allow them to log in without needing yet another account. I recall Aaron Parecki doing a video about IndieAuth and ActivityPub at the ActivityPub conference recently. This would make implementation easier.

I can’t wait to dig into Lemmy a bit more. It would be cool to have another IndieWeb friendly community hub (and particularly one in the Fediverse) for discovery, discussion, and interaction in the world. We need more projects like these to give people healthier alternatives to Facebook and Twitter.

IndieWeb Inspirational Cards

I’ve been tinkering with and test driving some various image creation tools.  To test them and simultaneously have some fun, I made a series of creative inspirational cards/inspirational posters/postcards for the IndieWeb. All the images are royalty free from Pixabay, and I’m releasing the text and additional work with a CC0 license. Feel free to download and use them to your hearts’ content. They should hopefully all be relatively well-sided for sharing on social media.

I’d love to hear folks’ thoughts about them in general.

Click any of the images below for a slideshow presentation view.

Anagrams for IndieWeb

It’s just a long enough word to make some other interesting words.

  • I Web Dine (apropos to eat what you cook!)
  • Newbie Id (because it’s all about identity, right?)
  • I In Ed Web (for those in the IndieWeb for Education space)
  • Be Win Die (the circle of an IndieWeb life perhaps)
  • Bed I Wine
  • I Be Wined
  • Id Be Wine
  • Bide Wine
  • I, We, Biden (in honor of the candidate who put something on their website)
  • I Bide New
  • Bide We In
  • I Bid Ween
  • I In Dweeb
  • Ewe In Bid
  • I Bind Ewe
  • Die In Web (without the IndieWeb, this is likely what the silos would drive us to)
  • Bi Weed In
  • Bed We I In

Am I missing anything fun?

Replied to Beyond Facebook Logic: Help us map alternative social media! by Ethan Zuckerman & Chand Rajendra-Nicolucci (knightcolumbia.org)

Our work on Digital Public Infrastructure is based on the idea that it’s possible to build very different social media which might strengthen us as a public, helping us be better friends, neighbors and civic actors. Towards that goal, we’re working to map the social media space, understanding the possibilities of “alternative” social media—and we need your help.

What we’re looking for is social media that works on a different “logic” than Facebook, Twitter or Instagram do. 

Zuckerman and Rajendra-Nicolucci have an interesting looking research project here that aims to look at means of potentially providing more civic-minded social media. 

I thought I’d take a short stab at beginning a conversation on this front as it’s an important topic that is near and dear to my heart. Not knowing if they’ve stumbled across the idea of the IndieWeb as a potential “solution” in the space, I thought I would briefly highlight a few pieces here as they relate to their stated framework involving five facets of social networks. 

Naturally the IndieWeb wiki has a huge wealth of information on this broader topic as well as thousands of examples of prior art in social media (which may help their research effort), so in addition to the brief framing I’ll delineate below, I’m compelled to provide links to two useful pages:

What follows is a small portion of my personal perspective as I see things with respect to their call for ideas and their structure. Others are heartily encouraged to chime in and provide additional information or perspective.

IndieWeb as a Social Media Platform

Technology

The basic underlying technology used by the IndieWeb community is the raw web itself. The community has built and expanded on a variety of W3C web specifications including Webmention (for notifications), Micropub (for publishing tools that work anywhere with anything), IndieAuth (an extension of OAuth), WebSub (for real time notifications), and Microsub (for abstracted feed readers and feed reading). Leveraging some of these open standards, their goal is to allow anyone on the web to use their programming language, platform, or server architecture of choice to publish, consume, and interact with others. This allows .php-based CMSs like Drupal, WordPress, and WithKnown to interact with other platforms like Craft, Nucleus CMS, Grav, Elgg, Django, or static site generators like Eleventy, Hugo, Kirby or even closed source publishing software or platforms like Micro.blog, Pine.blog, or Typlog. Their work does not preclude inclusion or use of these specifications by pre-existing social networks like Facebook, Twitter, Instagram, Mastodon, etc. which could leverage them to interoperate. Indeed many in the IndieWeb are already using some of these  these building blocks to interact and provide two-way communications with these very platforms. 

Revenue model

As an entirely volunteer, community-driven project, there is no immediate underlying economic model. Each user pays for and maintains their own service and has a greater range of control of their website and its use as well as their own data. Underlying the IndieWeb, there already exists basic businesses and competition for registering domain names and providing hosting services. Most people currently within the network (people who actively aware of and practicing IndieWeb as an idea) are building and/or self-hosting their own websites, but there is also a generally blank layer available on top of this that allows for a wide variety of businesses and revenue models. Examples of this already include some IndieWeb as a Service sorts of plays like Micro.blog, Typlog, Pine.blog, and I.haza.website which charge relatively nominal monthly fees for service.

Ideology

The primary purpose of the IndieWeb space is to directly increase the ownership and control users have over their web identities and data. Much of this is predicated on having one’s own domain name and some sort of website on it. The ability to own the URLs and easily export/import data from one platform to another means that the direct competition in the space focuses on providing a higher quality of services to the user in the form of portability and ease-of-use.

Governance

From my perspective, there is no direct governance, and as such, each user (or possibly the companies they designate or delegate to) is responsible for their own content and moderation within the boundaries of their local legal system. There is also the possibility for IndieWeb friendly aggregation hubs to provide discovery related services or even groups which may provide their own governance models. Looking at the terms of use or community guidelines for a platform like Micro.blog and how it allows (or doesn’t) interaction with other websites may serve as but one example of how this may work. Keep in mind that just because Micro.blog chooses not to allow functionality like showing/sending likes on their platform doesn’t mean that others in the space couldn’t do that if they wish. Similarly, many in the IndieWeb space dovetail with portions of the Fediverse, each portion of which is governed by the local rules of the server on which those instances are run.

Affordances

Since each site or sub-platform on the network may offer completely different or competing slate of functionalities, the range of affordances are seemingly limitless. Most of the sites in the space allow at least basic blogging and/or microblogging functionality as well as the ability to comment on or bookmark other content. Many sites in the space offer site-to-site notifications (via Webmention) or cross site conversation functionality. Given the increased diversity within the space, many IndieWeb sites already offer some or all of the affordances of almost every other social media platform but there is a larger diversity as many individuals can pick and choose what they want to use their personal websites for.


Now, all of this having been briefly covered, I’ll say that there is a lot more depth and subtlety built into this system because of the way it has evolved over an incredibly diverse set of implementations in the past decade. The IndieWeb is far from a complete solution and there is much more to be done on fronts like privacy, private posts/limiting audience(s), group functionality, decreasing potential abuses within the network, and etc.

Towards the idea of a Digital Public Infrastructure, I can’t help but mention that Greg McVerry and I have previously proposed/spitballed some models by which journalistic outlets (potentially in the form of town, city, or regional newspapers) or small governmental run entities (namely the vast network of public libraries) could provide their customers or constituencies some of the digital infrastructure in an IndieWeb as a Service manner. Some related practical examples of this include some universities and colleges supporting the idea of A Domain of One’s Own or Greg’s work in creating a teen camp that provides teenagers with their own websites.

If Zuckerman, Rajendra-Nicolucci, or others on their team are interested in discussing any of the above, I’m happy to provide as much time and knowledge as I can. My homepage on the web has a wealth of ways by which to get in touch with me.

I’d also invite them to join the IndieWeb chat (governed by the community’s code of conduct) where they should be more than welcome to participate and ask questions and to get the perspective of others who have also been actively working on fixing our common problems.

IFTTT, when are you going to add the ability to add a “That” target using Micropub? Currently there is either native Microsub support or plugins for a variety of platforms or CMSs like WordPress, Drupal, micro.blog, WithKnown, Craft CMS, Jekyll, Kirby, Hugo, Blot, etc.

Similar to something like webhooks, these endpoints can be used to send a wealth of data from one place to another. Right now I can see a great use case for going from almost any target that’s currently supported to a variety of endpoints that are currently built for websites or blogging use cases.

Leveraging Micropub may also make it easier to target a simpler common “surface” instead of dovetailing with hundreds of individual CMS platforms and their APIs.

I’ve been able to use Micropub with Webhooks to get around the current IFTTT limitations, but there is a lot more you might be able to do with it as a company while making it easier for customers as well.

Read - Want to Read: Reset: Reclaiming the Internet for Civil Society by Ronald J. Deibert (House of Anansi Press)

In the 2020 CBC Massey Lectures, bestselling author and renowned technology and security expert Ronald J. Deibert exposes the disturbing influence and impact of the internet on politics, the economy, the environment, and humanity.

Digital technologies have given rise to a new machine-based civilization that is increasingly linked to a growing number of social and political maladies. Accountability is weak and insecurity is endemic, creating disturbing opportunities for exploitation. 

Drawing from the cutting-edge research of the Citizen Lab, the world-renowned digital security research group which he founded and directs, Ronald J. Deibert exposes the impacts of this communications ecosystem on civil society. He tracks a mostly unregulated surveillance industry, innovations in technologies of remote control, superpower policing practices, dark PR firms, and highly profitable hack-for-hire services feeding off rivers of poorly secured personal data. Deibert also unearths how dependence on social media and its expanding universe of consumer electronics creates immense pressure on the natural environment. In order to combat authoritarian practices, environmental degradation, and rampant electronic consumerism, he urges restraints on tech platforms and governments to reclaim the internet for civil society.

hat tip:

With work/scheduling, I’m going to pass on arranging the monthly DoOO Meetup for November, though I’d invite others to put one together.

In lieu, I’ll recommend people join me at the bigger IndieWebCamp East on Nov. 14-15, where I’m sure there will be lots of Domains related discussions.