4

I want to open a google share dialog with some data, I use this as of now:

var GOOGLE_BASE_URL = "https://plus.google.com/share?url=";
url += GOOGLE_BASE_URL + urlToShare;
window.open(url, null, DIMENSIONS);

How can I set the text that will be the inserted into the comment section?

4

2 回答 2

5

预填充共享文本的唯一方法是使用交互式帖子代替共享链接。这是Google+ 登录附带的一项功能。如果您正在尝试通用共享方法,它可能不是您的最佳解决方案。但是,如果您已经使用 Google 作为身份验证方法,那么 Google+ 登录对您来说可能是一个不错的选择。交互式帖子不仅允许您预先填写文本,还可以预先填写最多 10 位分享的收件人,他们都将直接收到分享的通知。

于 2013-09-05T23:49:47.957 回答
4

文档中

Google+ 共享端点接受以下查询参数:

Parameter   Description
url         The URL of the page to share. This value should be url encoded.
hl          The language code for the locale to use on the Google+ sharing page.

Google 无法让页面作者指定用户应该对链接发表的评论。

所以,你不能。

于 2013-09-05T20:57:20.717 回答