This is a guest post from Alex Moss. He is Co-Founder and Technical Director at 3 Door Digital, and develops WordPress plugins. He found a way to share to Google+ from an external site, similar to the tweet button, and wanted to share it with SoS readers. The post has been updated after the launch of Alex’ plugin.
The Problem
Since Google+ launched, I have been asked a few times about whether there is some WordPress plugin or code to allow people to share a URL to Google+ from outside Google+ itself, in the same way a tweet, like or +1 button behaves. In short, there wasn’t one. I don’t understand why, because as an SEO I’d want to make sure this was available immediately or at least used the +1 button somehow to add functionality to share the +1′d URL within Google+ for all/your circles to see. There is one now however!
The Solutions
There are different ways of approaching this: using a WordPress Plugin or using a piece of code.
The Plugin
Alex has made a plugin to do this, which you can download here or in the WordPress Plugin Directory.
Installation:
- Download the plugin direct from the Plugin Page at WordPress.
- Upload the whole plugin folder to your /wp-content/plugins/ folder.
- Go to the Plugins page and activate the plugin
- Insert the shortcode!
Using the shortcode
You can also use the Google +1 button as a shorrtcode. Simply enter the following shortcode within a page, post or text widget. Here’s an example:
[ google1 ]
The ‘old’ Solution: code
When Alex originally wrote this post he used the method described below, which now is outdated. We however for future development purposes (you might just get an idea out of it) decided to keep the explanation up:
At the moment there’s still nothing official available that will let you do this, however, I realised that I could use the share URL from the mobile site and manipulate it to behave how I want.
Step 1: Get a Good “share” button image
I modified the wide +1 button and changed the text to “share”. I made both the grey and blue versions of it below:
![]()
![]()
Step 2: Grab the Code
Here’s some sample code:
<a href="https://m.google.com/app/plus/x/?v=compose&content=INSERT_MESSAGE_HERE_WITH_URL_IF_YOU_WANT" onclick="window.open('https://m.google.com/app/plus/x/?v=compose&content=INSERT_MESSAGE_HERE_WITH_URL_IF_YOU_WANT','gplusshare','width=450,height=300,left='+(screen.availWidth/2-225)+',top='+(screen.availHeight/2-150)+'');return false;"><img src="http://path.to/plus.png" alt="Share on Google+" width="55" height="22" /></a>
The URL linked to contains the parameter content. This parameter will automatically generate as the post when the widow opens. I have also added 2 things into the <A> tag:
- rel=”nofollow”
- The JS window.open() function to open the window as a pop in the center of the screen. To find a tidier version of the center of the screen JS, click here.
Here’s a working example of the button, sharing this article. Note that this will open a new window but will ignore the window.open() command:
Optional Step 2.5: Insert into WordPress
WordPress is awesome, but you knew that already. WordPress here will be your friend by choosing all the 3 parameters automatically. I can edit the code slightly from Step 2 and I end up with this:
<a href="https://m.google.com/app/plus/x/?v=compose&content=<?php the_title(); ?> - <?php the_permalink(); ?>" onclick="window.open('https://m.google.com/app/plus/x/?v=compose&content=<?php the_title(); ?> - <?php the_permalink(); ?>','gplusshare','width=450,height=300,left='+(screen.availWidth/2-225)+',top='+(screen.availHeight/2-150)+'');return false;"><img src="http://path.to/plus.png" width="55" height="22" alt="Share <?php the_title(); ?> on Google+" title="Share <?php the_title(); ?> on Google+"></a>
NOTE: Insert this within your theme directly, not a post or page. For some reason I have noticed that WordPress removes the window.open command when inserted within a post/page.
The Limitations:
There are 3 limitations to this:
- The popup doesn’t look pretty, but that can be designed around if you want. I just white labelled it for you
- You can’t choose individuals to share with, but you can choose all circles and the general public.
- The shared URL doesn’t get optimised/embedded into the post as you would when sharing a URL the traditional way.
The last point is a shame, but I guess if you really want the feature on your site it’s worth breaking one egg.


Great idea but a potential privacy hazard as clicking the button requires the following:
“By tapping ‘Accept’, you agree that Google will use your location in this product and accept the Mobile Terms of Service.”
You can add &hideloc=1 to the parameters which should stop this from being an issue.
Pretty cool… Thanks for sharing your share buttons!
[...] plugin or code allowing people to share a URL to Google+ from outside of Google+. “… …How to Share on Google+ from any websiteState of Searchall 2 news [...]
[...] plugin or code allowing people to share a URL to Google+ from outside of Google+. “… …How to Share on Google+ from any websiteState of Searchall 2 news [...]
[...] “…As an SEO I’d want to make sure this was available immediately or at least used the +1 button somehow to add functionality to share the +1′d URL within Google+ for all/your circles to see,” Moss wrote in a guest post on State of Search. [...]
Thanks! Will put it on my website. Would love it though if you could somehow program the familiar balloon with # times shared, above or aside the button. More coherent with the rest of my buttons
.
At the moment there’s no way of having a counter to illustrate the number of shares. However, it’s not impossible to create a counter for the number of times the button is clicked – not very accurate though!
Smart piece of code, thanks for sharing it!
[...] How to Share on Google+ from any website, State of Search [...]
Is there a Google+ share URL that can have a URL appended to its query string?…
Just found a workaround: stateofsearch.com/share-on-google-plus-any-website/ Though it only displays the mobile interface, it still works. [code]https://m.google.com/app/plus/x/?v=compose&content=[TEXT_TO_SHARE_HERE][/code]…
Requires my Google account password even though I’m logged into Google+ and Gmail in other tabs. Would like something that doesn’t require me to input my google account password because there’s no way I’d ask anyone to use this as it is.
Weird, all of my tests showed me as already logged in. What browser are you using?
Great tip!
I just shared your post on my Google+ account, and can already see a multitude of ways that it can be used within the online marketing space.
Would love to hear everyone’s thoughts on how we can start better utilizing Google+ for marketing. The share button is a step in the right direction, but i don’t think everyone has Alex’s mind to manipulate the code and create alternate functionalities.
http://www.GooglePlusForums.com has started listing tip and tricks, would love to get feedback.
[...] Bei stateofsearch gibt es neben zwei Share-Buttons auch entsprechende Codeschnipsel. Ich habe hier testweise mal zwei Varianten mit folgendem Code eingebunden, welche funktionstüchtig sind: [...]
thanx, for that. will use it with js integration in wordpress.
http://www.aboutgplus.de/2011/08/10/google-share-button-selbst-gebaut/
[...] code voor de share-button is terug te vinden op de StateofSearch blog. Mensen die niet zo handig zijn met code moeten nog even afwachten. Alex Moss is namelijk een [...]
[...] knop om direct je website of content op Google+ te delen. Hier bedacht Alex Moss wat op en schreef op StateOfSearch over hoe je een zelfgemaakte “Deel op Google+” knop op je site kunt [...]
[...] Quelle [...]
[...] ovu novu značajku na vašu web stranicu ili da bi je dodali na WordPress teme, možete pronaći ovdje. Relevantni naslovi:Novi Google +1 gumb od danas dostupan za implementiranje na web [...]
[...] Moss hat eine simple Möglichkeit aufgezeigt, mittels eines simplen Buttons (oder Links) Beiträge aus jeder beliebigen WebSite heraus bei [...]
[...] normale Webseiten, die für ihre Webseite keine WordPress Software benutzen, gibt es hier bei StateOfSearch. Scheinbar lässt sich der Share Button bislang nicht in einzelnen WordPress Posts, sondern nur [...]
WHY IS ALL THE CODE IN CAPS?
How do I install this into my sharebar?
I tried entering the code but it doesn’t work.
[...] to their main Google+ timeline from outside of it. Alex Moss has been kind enough to provide a comprehensive guide on how to implement such a feature for WordPress (or other types of) websites. As you probably can tell, we are using Sharebar for WordPress to [...]
CAPS OFF ?!? Why is all the HTML caps locked ?
The caps is the font in the template, I fixed that now, but we are looking at what is a better solution.
[...] (Источник) Похожие записи:Gmail-тема в стиле Google+Виджет G+ для сайта2 темы оформления в стиле Google+ для Windows 7Скрипты с эффектами из галереи и кругов Google+ (jQuery, CSS) window.___gcfg = {lang: 'ru'}; (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); The Google+ Song (видео) → // [...]
[...] (src) [...]
[...] Moss, the Head of SEO at Banc Media and a WordPress plugin developer, has come up with a temporary solution to get a Google+ share button on to your posts, by adding the code directly into your WordPress [...]
[...] Moss, the Head of SEO at Banc Media and a WordPress plugin developer, has come up with a temporary solution to get a Google+ share button on to your posts, by adding the code directly into your WordPress [...]
[...] Moss, the Head of SEO at Banc Media and a WordPress plugin developer, has come up with a temporary solution to get a Google+ share button on to your posts, by adding the code directly into your WordPress [...]
[...] dann habe ich hier noch eine Seite gefunden, die einen Share Button gebastelt hat. Habs noch nicht ausprobiert, [...]
[...] a WordPress plugin developer, has come up with a temporary solution to get a Google+ share button on to [...]
[...] Moss, the Head of SEO at Banc Media and a WordPress plugin developer, has come up with a temporary solution to get a Google+ share button on to your posts, by adding the code directly into your WordPress [...]
[...] interesuje, detaljno uputstvo za implementaciju dugmeta možete pogledati ovde. Blog this! Bookmark on Delicious Digg this post Recommend on Facebook Share on Linkedin share via [...]
[...] How to Share on Google+ from any website – State of Search Kommentare: 0 Tweets: 0 Facebook-Likes: 0 15.08.2011 Ads_BA_AD('FOOT'); Das könnte dich auch interessieren:t3n-LinktippsTumblr überholt WordPress, CIA-Website gehackt, Chromebooks Verkaufsstart, Facebooks Foto-Sharing AppDiesmal bei unseren Fundstücken aus dem Netz: Tumblr überholt WordPress, Hackergruppe legt CIA-Website lahm,…t3n-LinktippsCSS3 animiert, SEO mit Google Docs, Sliding Content, Twitter Tools, Facebook stagniertDiesmal bei unseren Fundstücken aus dem Netz: eine Einführung in CSS3 Keyframe Animationen, Social Media Links mit…TechnikLOAD 44 – WordPress 3.2, Facebook-Videochat, Crowdfunding, OS X Lion und das GewinnspielWordPress 3.2 ist erschienen und überrascht uns mit einem Kiosk-Mode und der Schriftart Arial.Google +1 schlägt Twitters Tweet-Button innerhalb eines MonatsGoogle +1 Social Buttons legen einen sagenhaften Start hin. Obwohl sie erst seit etwas mehr als einem Monat verfügbar… Weitere Artikel zu Facebook, Google, Google+, Social Networks und WordPress [...]
great, well done Alex. You are right though, the box isn’t pretty or easy to figure out, it doesn’t feel like it’s “legit” if you know what I mean. But it’s very cool and a good start.
[...] aber die Erklärung wie’s geht habe sogar ich verstanden. Alex Moss erklärte damals auf State of Search, wie es zur Überbrückung geht. Hier aber der link zum Plugin und Erläuterung: (klick auf [...]
[...] erfordert die Einbindung des Buttons etwas handwerkliches Geschick. Mit der Anleitung dürfte es aber funktionieren. Trotzdem eine praktische Sache finden wir. Daher haben wir ihn auch [...]
[...] New! How To Share Google+ URLs From A Website: A hack to enable G+ [...]
[...] le titre en anglais du lien «How to Share on Google+ from any website – Google – State of Search» que je traduis [...]
[...] How to Share on Google+ from any website – State of Search – Alex Moss of Pleer has developed a workaround solution for a Google+ sharing button. You can add it to your site for your visitors to share directly on Google+, in contrast to +1 votes that show up in an extra tab. [...]
[...] How to Share on Google+ from any website – State of Search – Alex Moss of Pleer has developed a workaround solution for a Google+ sharing button. You can add it to your site for your visitors to share directly on Google+, in contrast to +1 votes that show up in an extra tab. [...]
[...] говоря, не очень. Но выбора как бы нет, так что говорим автору кнопки [...]
hello,
very good code !
but, how to share thumbnail ?
Thank’s
Is there a URL this will work with that isn’t for mobile?
Exactly what I was looking for Andy!
This uses the mobile version of google plus. Is there something equivalent for the desktop version? I’m trying to implement an html only (no script) version of the +1 button.
Unfortunately this is the only way, and has to use the mobile site as Google+ haven’t offered a desktop version of it. Google+ have mentioned that you can share on Google+ once you +1 the URL – but I’m yet to see that for myself
Thanks to your code I was able to craft a nice custom working share button. Thanks so much!
care to share the URL?
This one is quite neat:
http://ajbatac.com/gplus-bookmarklet.php
NICE job man
, i’m going to use it not on wordpress site but on my personnal rss reader 
THX a lot !!
It prompts me to accept the Mobile Terms of Service, and when I click “Accept” it simply refreshes the message. Can’t get past it.
Same as Sam said. Can’t get past the Accept button. Any workaround?
The code can now be updated. I have made this into a WordPress plugin now:
http://pleer.co.uk/wordpress/plugins/google-plus-share-button/
Is there a URL this will work with that isn’t for mobile?
[...] what do people share…? Links! And they share many. Surprisingly enough Plus is already the second largest referral to State of [...]
Thank you for your work on this Alex.
Unfortunately I can not get it work. I have tried to add &hideloc=1 to the parameters as you suggested and I think I am not doing it right. Can you provide a code snippet as an example? I would love to implement on my site ASAP.
[...] trước chỉ có thể share qua link mobile, giờ có thêm 1 cách trực tiếp [...]
Getting ‘An error occurred. Please try again.’ message. When I try to share. The error also occurs on the share button on this website. Anyone have any thoughts. I’m using a User Agent switcher set to iPhone.
Yo can share using the +1 button. Once you clicked on it wait and click on ‘share on Google+’
Getting ‘An error occurred. Please try again.’ message. When I try to share. The error also occurs on the share button on this website.
I have since developed a WordPress plugin for this:
http://pleer.co.uk/wordpress/plugins/google-plus-share-button/
[...] Bookmarklet Google+ dari Aj Batac Tombol Custom Google+dari Alex Moss [...]
[...] experts on G+ points out that this was possibly by a hack using the mobile client as described here http://www.stateofsearch.com/share-on-google-plus-any-website/ Check the comments below. Remember you still have click the post button yourself so it´s no [...]
You mentioned there’s a way to ‘share’ to the general public using this method. Is there a way to code it so that the public option is selected by default to anyone who clicks?
Getting ‘An error occurred. Please try again.’ message. When I try to share. Plese help me out that why Am I getting this error.
Using the below code to share content on google plus. Plese tell me where am I doing wrong:
<a href='https://m.google.com/app/plus/x/?v=compose&content=‘
onclick=”window.open(‘https://m.google.com/app/plus/x/?v=compose&content=’,'gplusshare’,'width=450,height=300,left=’+(screen.availWidth/2-
225)+’,top=’+(screen.availHeight/2-150)+”);return false;”>
[...] you’re offering people. There is currently no official ‘Share on Google+’ button (though unofficial ones have been hacked), but this could prove a valuable tool. Even before brands are formally allowed on Google+, the [...]
your example doesn’t work (anymore)
Yes this is now outdated. Since then the +1 button now lets you share the URL too. Of course I made a WordPress plugin for that
http://pleer.co.uk/wordpress/plugins/google-1-button/
Thanks for the plugin link!
[...] Cross-share content. If others in your network find a great link, there’s no reason you shouldn’t share that information with your circles, too. Just acknowledge your source! Others may thank you for passing on their links. [...]
[...] Cross-share content. If others in your network find a great link, there’s no reason you shouldn’t share that information with your circles, too. Just acknowledge your source! Others may thank you for passing on their links. [...]
Check out this item I found on eBay:
Peter andre’s boxer shorts
Link: http://www.ebay.co.uk/itm/Peter-andres-boxer-shorts-/221015312230
(Sent from eBay Mobile for Android)
interesting
Very nice info. Can you post instructions for Blogger too? My article marketing site has a Google Plus emblem but I can’t discern any traffic from it…
Thanks, I was looking for this from a long time.
[...] by first making it possible to share via the +1 button, (even though that took a while and we already had our own version) and later by even giving the readers other interesting posts on a site when mousing over the [...]
Truly exemplary work, Alex. This could use an update, however, to help out people using Typad. I recently signed up there and tried accessing google+ but couldn’t get my black card Visa site to point to it.
More people have shared on Google+ that I thought they would, for sure.
[...] Did you know the most visited post in total is “How to Share on Google+ from any website“ [...]
How to share my stock market tips link http://integratedonline.blogspot.in/
[...] The Social Signal is a Ranking Factor – 6 Ways Google Gets Your Social Data – How to use Google + – How to Share on Google+ – How To Become That Suggested User on [...]
Google+
is awesome, the User experiences great, and I actually love it. And the way
they have opened it up to allow users to engage with each other more is great.
There is no doubt that Google+ does go beyond being just a social network at
Google. It continues to be interwoven into everything Google offers — and
that’s what’s especially unique, Google’s ability to mine social signals
directly linked with its own products
Thanks….I wonder how often this is used.
[...] erfordert die Einbindung des Buttons etwas handwerkliches Geschick. Mit der Anleitung dürfte es aber funktionieren. Trotzdem eine praktische Sache finden wir. Daher haben [...]
Sing up and earn
Use below your referral link to spread among your friends and earn money on every visit.
http://Peopledone.com/?ref=9535
great and kind
how it’s works with auto post on google + ? because I need the plugin for my web http://gesertelunjuk.com dude..?
btw thanks for sharing
[...] How to Share on Google+ from any website [...]
Thanks a lot for the valuable article and specially for describing all those google + things in the starting of your article. I truly liked it because I’ve been wondering for white a while now what the actual difference is.
Regards
Paul
Brilliant work thanks!
Very handy addition thank you.
Excellent blog post. I definitely love this website.
Continue the good work!
Amazing! Its in fact remarkable post, I have got much clear idea concerning from this paragraph.
You’re so cool! I do not suppose I’ve truly read a single thing like this before.
So nice to discover another person with original thoughts on this subject matter.
Seriously.. thank you for starting this up. This web site is
something that’s needed on the internet, someone with a little originality!
Really no matter if someone doesn’t be aware of then its up to other people that they will help, so here it happens.
Hey! I’m at work browsing your blog from my new iphone 4! Just wanted to say I love reading your blog and look forward to all your posts! Carry on the great work!
Hi! Do you know if they make any plugins to safeguard against
hackers? I’m kinda paranoid about losing everything I’ve worked hard on.
Any recommendations?
After proving that a 1080p webcam on usb 3. System setup is supereasy: plug the DAC port into
your computer, and an accompanying family of
wireless input devices.
All need is der for net people and how to make money in net