Collect signatures for an article on your blog or a website page.
- Mastodon
- Friendica
- Pleroma
- Akkoma
- Misskey
- Calckey
- Sharkey
- Firefish
Please see the included example.html
file for a full example of the code needed to add a fediverse signature feature to a web page.
Here's a breakdown of the steps:
- Add a link to
https://signatures.stefanbohacek.dev/signatures?url=ENCODED_CURRENT_PAGE_URL
. Here's how such a URL can be created dynamically with JavaScript.
const currentPageUrl = encodeURIComponent(window.location.origin + window.location.pathname);
const signatureURL = `https://signatures.stefanbohacek.dev/signatures?url=${currentPageUrl}`;
- Make an AJAX request to
https://signatures.stefanbohacek.dev/signatures?url=ENCODED_CURRENT_PAGE_URL&format=json
to request the list of accounts who signed your page.
{
"page_url": "https://stefanbohacek.com/blog/a-fediverse-invitation-for-artists/",
"signatures": [
{
"account": "stefan",
"server": "stefanbohacek.online",
"account_clean": "stefan",
"server_clean": "stefanbohacek.online",
"url": "https://stefanbohacek.online/@stefan"
}
]
}
Note that account_clean
and server_clean
are filtered for any potential profanities.
Note that this project relies on my personal hosted copy of the auth-server project. If you're interested in self-hosting, please reach out for more details.
npm install
npm run dev