Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set text for google+ link with javascript

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?

like image 909
MJB Avatar asked Jan 13 '23 11:01

MJB


1 Answers

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 comes 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.

like image 77
Joanna Avatar answered Jan 17 '23 18:01

Joanna