This blog will help you to share some interest webpages with your friends using Google+ share functionality.
Its very easy to add in your webpages.
Icons :
The Google Plus share icon is available in a number of different sizes.
https://www.gstatic.com/images/icons/gplus-64.png
https://www.gstatic.com/images/icons/gplus-32.png
https://www.gstatic.com/images/icons/gplus-16.png
The share link invokes the Google+ share endpoint, which you can also link to directly:
https://plus.google.com/share
The Google+ share endpoint accepts the following query parameters:
- The URL of the page to share. This value should be url encoded.
- The language code for the locale to use on the Google+ sharing page.
We need to update HTML schema with Google compatible meta tags, It will generate preview information.
Create a page with below content,
[source]
[/source]
When you press the google +1 button on a site it grabs the typical meta data such as title,image and description.
Sample Google Plus button code
[source]
<%= image_tag "google.png" ,:size=>“32×32”,:title=>”Share on Google+”%>
[/source]
Output :