我已經打了同樣的障礙也。您不能在自己的功能或呼叫者中使用+1。你需要使用谷歌代碼來實現這一點。
然而,你可以做的是使用JavaScript共享窗口來傳遞你自己的參數。
這就是我使用的。
function shareToGooglePlus(destination,title,description,imageurl)
{
var go = "https://plus.google.com/share?";
var url = "url="+encodeURIComponent(destination);
var title = "title="+encodeURIComponent(title);
var description = "content="+encodeURIComponent(description);
var images = "image="+encodeURIComponent(imageurl);
this.openWindow(go+url+"&"+title+"&"+description+"&"+images)
}
所得網址爲一個新窗口的URL打開:
https://plus.google.com/share?url=http%3A%2F%2Fwww.ortho.nl%2Forthomoleculair-blog%2Fnieuws%2F2014%2Fvitamine-c-en-chemo%2F&title=Vitamine%20C%20en%20chemotherapie&content=Vitamine%20C%20en%20chemotherapie%0A%0AHet%20ondergaan%20van%20een%20behandeling%20met%20chemotherapie%20is%20%C3%A9%C3%A9n%20van%20de%20zwaarste%20beproevingen%20die%20iemand%20met%20kanker%20vaak%20moet%20d&image=https%3A%2F%2Fwww.ortho.nl%2Fcss%2Fafbeeldingen%2Fwebsite%2Ftwitter_photo.jpg
,如果你想使用谷歌的+1按鈕,我建議使用微在自己的網站
https://support.google.com/webmasters/answer/146897?hl=en