Buy Me a Beer Button

Get a Buy me a Beer Button for your Website

If you run your own website or blog and would like your visitors to be able to show their appreciation for your content by buying you a drink, you can add one of our cool buttons to your site. We think of it as Flattr for beer! Its easy to install and will link directly to our buy a drink page with all your information already filled in.

Just follow the steps below to install the button:

  1. Login to your account at BuddyBeers.com
  2. Click on the “Profile” link in the upper right next to your name and picture
  3. At the bottom of the right-hand column you will see “Add a Button to your Website”
  4. Right now you can choose to add your name to the button by clicking the link (more options will come later, or if you’re a super code monkey check out the “Additional Features” section below)
  5. Copy the code in the box
  6. Paste the code into your website’s code or have your website developer do it for you
  7. Voila! People can now show their appreciation for you by buying you a drink!

Additional Features for the Adventurous

Feel free to mix and match the options below as they should all degrade gracefully. Let us know if you have any other suggestions: tech at buddybeers dot com

Showing a name in the button:

  • You can show your username in the button by adding a name=true parameter to the script tag’s src attribute.
  • You can show an alternate name in the button by changing the name parameter to any other url escaped string. For example, name=The%20Buddy%20Beers%20Staff will result in a button that says “Buy The Buddy Beers Staff a Beer”

Showing a drink name in the button:

  • If you pass in an id for any price in our database as a parameter (price_id) to the script tag’s src attribute the price name will be displayed in the button. Also, upon click, the user will be redirected to the buy a beer form with the correct drink and bar chosen. For example, passing price_id=385 will result in a button that reads “Buy me a Carlsberg” and that links to the buy a beer page with The Buddy Beers Office Bar and 1 Carlsberg chosen. Price IDs can be fetched via our API.
  • You can show an alternate drink name by passing “drink” as a parameter to the script tag’s src attribute followed by the desired drink name as a url escaped string. For example, passing drink=A%20Cold%20One will result in a button text of “Buy me A Cold One.” This method can also be used to override the drink name when passing a price_id (as mentioned above). For example passing price_id=385&drink=a%20frosty%20Carlsberg will result in a button with the text “Buy me a frosty Carlsberg” but that still links to the form with the appropriate bar and drink chosen.

Linking to a specific bar:

If you pass in an id for any bar in our database as a parameter (location_id) to the script tag’s src attribute the bar will be automatically selected when the user clicks through from the button. For example passing location_id=272 will link the user to the buy a beer form with the Buddy Beers Office Bar automatically chosen. Bar IDs can be fetched from our API.

Cette page a été mise à jour le: 1 May 2013