将Google Plus(一个或共享)链接添加到电子邮件简报中

Dog*_*oku 128 email share newsletter google-plus-one google-plus

我正在尝试在简报中找到一种为Google+嵌入分享/ + 1链接的方法,就像Facebook分享和推文推文链接可以嵌入到简报中一样,可以使用以下两个网址来实现:

https://www.facebook.com/sharer.php?u=[URL]&t=[TEXT]
http://twitter.com/intent/tweet?source=sharethiscom&text=[TEXT]&url=[URL]
Run Code Online (Sandbox Code Playgroud)

Google Plus是否有类似的功能?

我自己找到的只有Google+按钮,不幸的是使用了JavaScript,因此无法用于电子邮件简报.我希望谷歌提供静态网址回退,但我无法在任何地方找到它.

小智 213

https://plus.google.com/share?url=http%3A%2F%2Fexample.com
Run Code Online (Sandbox Code Playgroud)

您可以使用官方Google+分享链接Google+上分享链接.将url参数替换为您要共享的URL编码链接.

  • 是的它很好,也为我工作,但我需要添加标题与这个网址,我尝试和查询字符串像"&title-mytext"那样,但它不影响共享评论,我为此做什么?...你可以劝我! (6认同)
  • 如何通过查询字符串提供标题/标题?我正在尝试共享JPG,但无法指定HTML元数据. (3认同)
  • 很好.我想知道官方文件在哪里. (2认同)

dav*_*ars 36

这个适用于我:

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


mim*_*ing 24

共享链接可以让你做到这一点.它可以在电子邮件中使用,但它与+1按钮不完全相同.

要使用共享链接,请在符合Google+按钮政策的电子邮件中添加链接元素.将href属性设置为https://plus.google.com/share?url={url encoded share target}

例如,通过链接到https://plus.google.com/share?url=http%3A%2F%2Fexample.com,您就可以在Google+分享example.com:Google+分享按钮 (是的,这是一个有效的演示).

查看官方文档了解更多信息.

如果您使用此方法,请注意它不是+1按钮的直接替代品.该链接在Google+上共享目标网址,但实际上并未对目标网页+1.只有+1按钮才能+1页面.


小智 16

需要自定义标题,描述和图像的人的解决方案.您应该对目标网址进行以下更改:

步骤1.itemscope itemtype ="http://schema.org/LocalBusiness"添加到<html>标记中.它看起来像<html itemscope itemtype="http://schema.org/LocalBusiness">.这里有更多的项目类型

第2步.将以下元标记放入<head>,根据您的需要更改内容属性:

<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}">
Run Code Online (Sandbox Code Playgroud)

第三步.将以下链接添加到您的简报或任何您想要的地方:

<a href="https://plusone.google.com/_/+1/confirm?hl=en&url=http://www.your_url.com">Share it</a>
Run Code Online (Sandbox Code Playgroud)

小费.要查看Google如何查看您的网页,您可以使用此工具http://www.google.com/webmasters/tools/richsnippets.您可能会对页面中的Extracted rich snippet数据部分感兴趣

祝你好运,劳里斯


Tra*_*er1 12

我正在使用以下.. :)

https://m.google.com/app/plus/x/?v=compose&content=[TEXT]%20[URL]
Run Code Online (Sandbox Code Playgroud)