Early June I released version 0.1.0 of my Google +1 Helper for WebMatrix and Razor. This helper provides easy access to the Google +1 functionality that was released the day before. This page will serve as a documentation placeholder. Have a look at the full post to get more information on the helper; also, feel free to head to the Google +1 Helper NuGet package page and give it a try!
The Google Checkout helper is implemented as a NuGet package and can be downloaded directly from there, but of course it is much more convenient to use the build-in infrastructure WebMatrix offers: open the ASP.NET Web Pages Administration, search for the helper in the Package Manager, and install it into your project.
After installation, you can access the functionality using the GooglePlusOne helper name. The easiest way to get the helper working is to use all the default options:
The GooglePlusOne helper supports two display options Google +1 offers: setting the language, and setting the size of the button.
For the language, GooglePlusOne.Languages contains an enumeration with all the (currently 44) languages Google +1 supports. You can provide the language either by using the the first argument to PlusOneButton(), or by using the named parameter language as shown here:
Button (only outputs the markup to load the Google +1 button)
If you are using ASP.NET MVC, you can also use this helper. When you have NuGet installed on your system (or even in Visual Studio), you can then install the helper:
PM> Install-Package GooglePlusOne
Then, just add the appropriate markup to one of your Razor views. When using the default ASP.NET MVC3 website template, you could put the following code in your /View/Home/Index.cshtml file - you even get IntelliSense!
When I press on Google +1 share button I get error. I have read the error messages on Googles site and everything is okey with my web browser.
I get the triangle icon.
You can ignore the twitter error.
Here is a picture: