最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

html - set text for google+ link with javascript - Stack Overflow

programmeradmin1浏览0评论

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

var GOOGLE_BASE_URL = "=";
url += GOOGLE_BASE_URL + urlToShare;
window.open(url, null, DIMENSIONS);

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

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

var GOOGLE_BASE_URL = "https://plus.google./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 ment section?

Share Improve this question edited Sep 5, 2013 at 20:50 MJVDM asked Sep 5, 2013 at 20:40 MJVDMMJVDM 3,96310 gold badges50 silver badges72 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

The only way to prefill the text of a share is to use Interactive Posts in place of the share link. This a feature that es with Google+ Sign-In. It may not be the best solution for you if you are trying for a general share approach. However, if you are using Google as an authentication method already, then Google+ Sign-In could be a good option for you. Interactive Posts not only allow you to prefill text, but also to prefill up to 10 recipients of the share, who will all be directly notified of the share.

From the documentation:

The Google+ share endpoint accepts the following query parameters:

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 provide no way for a page author to specify the ment that the user should make about the link.

So, you can't.

发布评论

评论列表(0)

  1. 暂无评论