Buy Me a Beer Button

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:
- Login to your account at BuddyBeers.com
- Click on the “Profile” link in the upper right next to your name and picture
- At the bottom of the right-hand column you will see “Add a Button to your Website”
- 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)
- Copy the code in the box
- Paste the code into your website’s code or have your website developer do it for you
- 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=trueparameter 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%20Staffwill 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, passingprice_id=385will 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%20Onewill result in a button text of “Buy me A Cold One.” This method can also be used to override the drink name when passing aprice_id(as mentioned above). For example passingprice_id=385&drink=a%20frosty%20Carlsbergwill 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.
Diese Seite wurde zuletzt aktualisiert am: 4 Jan 2012.





