Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a Google Plus (one or share) link to an email newsletter

https://plus.google.com/share?url=http%3A%2F%2Fexample.com

You can share the link on Google+ with the official Google+ share link. Replace the url parameter with the URL encoded link you want to share.


This one works fine for me :

https://plus.google.com/share?url=your-page-url


The share link allows you to do this. It will work in an email, but it's not quite the same as the +1 button.

To use the share link, add a link element to your email that complies with the Google+ Buttons policy. Set the href attribute to https://plus.google.com/share?url={url encoded share target}

For example, linking to https://plus.google.com/share?url=http%3A%2F%2Fexample.com will allow you to share example.com on Google+: Google+ share button (yes, that is a working demo).

Check out the official docs for more info.

If you use this approach please be aware of the fact that it is not a direct replacement for the +1 button. The link shares the target URL on Google+, but it does not actually +1 the target page. Only the +1 button can +1 a page.


Solution for those who needs custom title, description and image. You should make following changes to target URL:

Step1. add itemscope itemtype="http://schema.org/LocalBusiness" into <html> tag. It will look like <html itemscope itemtype="http://schema.org/LocalBusiness">. More itemtypes here

Step2. Place the follwing meta tags into <head>, change content attributes according your needs:

<meta itemprop="name" content="{Custom title goes here}">
<meta itemprop="description" content="{Custom description goes here}">
<meta itemprop="image" content="{http://www.your_url.com/your_image.png}">

Step3. Add the following link to your newsletter or anywhere you want:

<a href="https://plusone.google.com/_/+1/confirm?hl=en&url=http://www.your_url.com">Share it</a>

Tip. To check how google sees your page, you can use this tool http://www.google.com/webmasters/tools/richsnippets. Probably you'll be interested in section Extracted rich snippet data from the page

Good luck, Lauris


I'm using the following.. :)

https://m.google.com/app/plus/x/?v=compose&content=[TEXT]%20[URL]

I personally suggest Google Plus Interactive Posts button https://developers.google.com/+/web/share/interactive to use in your apps/websites.Here Google Plus allows many customizations to do according to the requirement. I have used it in my app. Its a better option than Share button.


Maybe this helps. It works (partially) for me. http://www.stateofsearch.com/share-on-google-plus-any-website/