How to add a Flattr button on every tumblr post

When I first started using Flattr (If you don’t know about Flattr yet, check it out! It’s pretty cool), I wanted an easy way to add Flattr buttons to my tumblog posts. I found this blog post that explained how to do it. This worked great for awhile, but recently my buttons recently stopped working and were just displaying “Error”. On investigation, I discovered that it only occured (for whatever reason) on posts which hadn’t yet been flattr’d.

I found that if I upgraded the button HTML to the HTML 5 version, they started working again. I also took the time to make several upgrades to the button HTML. The buttons now:

  • Use the title of each post as the Flattr title (this will be empty if you don’t set a title on your post, so make sure to always set a title!)
  • Submit the tags of the post as the tags for the Flattr “thing”
  • Intelligently use a meaningful description based on the post type.

Read More