Skip to main content


Can someone give advice on making some HTML code for a "Share on Mastodon" button to be placed on a website or blog?

I know we've had a thread about this before, but there was some disagreement over best solution. Would be interesting to hear latest thoughts on this!

(Asking as @heidilifeldman is in need of this code! 🙂 "I need code that creates a button and takes people to a URL from which to share.")

#AskFedi

This entry was edited (2 days ago)
in reply to funnymonkey

@funnymonkey @inquiline Specifically, here's code that fulfills your requirements of linking to the #MastodonForHarris hashtag and the ActBlue campaign, with the text that they donated. https://gist.github.com/benwerd/b7da52bb0a200f73d7b78f500c5e4f21

funnymonkey reshared this.

in reply to Heidi Li Feldman

@funnymonkey @inquiline Unfortunately the svg doesn't seem to be working with ActBlue. I recommend removing the logo. I've updated the gist accordingly.
in reply to Ben Werdmuller

@ben@werd.socia I was JUST about to ask you if we could get rid of the yellow caution sign. I’ve updated the code. @funnymonkey @inquiline @FediTips