The Google+ mobile web platform lets you integrate your mobile site with Google+ to create a more engaging and personal experience for your users. The platform provides the following components:
- +1 button - Enable users to +1 content from within your site.
- Share dialog - Let users share content from your site to Google+.
Recommend content with the +1 button
The +1 button lets users provide a lightweight endorsement to content on your site. The easiest method for including a +1 button on your page is to include the necessary JavaScript resource and to add a +1 button tag:
<script src="https://apis.google.com/js/platform.js" async defer></script>
<g:plusone></g:plusone>
For more advanced uses, or for HTML5-compliant syntax, visit the +1 button configurator tool to generate customized +1 button code for your mobile site.
Share on Google+
The Share dialog provides a means for users to share rich content from your app into the Google+ stream, including text, URL attachments and location.
The easiest method for including a share button on your page is to include the necessary JavaScript resource and to add a share button tag:
<script src="https://apis.google.com/js/platform.js" async defer></script>
<g:plus action="share"></g:plus>
For more advanced uses, or for HTML5-compliant syntax, visit the share button configurator tool to generate customized share button code for your mobile site.
Frequently asked questions
- Do the Google+ buttons appear when my site is viewed in mobile browsers?
-
The +1 button and Share dialog are supported on iOS 4.0+ and Android 2.1+, so once you add the +1 button or Share dialog to your site, the corresponding button will be visible when viewed in these browsers.
- Does the +1 button appear in search results on mobile browsers?
-
No, the +1 button is not yet supported for mobile search results.
- Do +1's on my mobile site count towards the total +1's on a site or are they counted separately?
-
If your mobile and desktop sites use the same URL, the +1's will be counted together. Otherwise, the +1 counts will be separate. Google recommends that you use
rel="canonical"
to indicate the preferred version of each page. More information about +1 and canonicalization. If for some reason you are unable to userel="canonical"
, you can use advanced options on the +1 button configurator to edit the button code to specify the URL you want +1'd when the user clicks the button. - When I click on the mobile +1 button, will a share dialog appear?
-
No, the mobile +1 button does not display a share dialog after the +1 button is clicked.