Reputation: 169
I am trying to share my page on Google Plus.. but the problem is that google plus is using my website logo to display as my post image on google Plus screen. I want it to display my posts image not the website logo.. how can i do that.. i am using following code to share the link /+1/confirm?hl=ru&url=">https://plusone.google.com//+1/confirm?hl=ru&url=
Is there any way by which i can also set my iimage url which will display as my post image on Google Plus. Some thing like this /+1/confirm?hl=ru&url=URL&img=ImageUrl">https://plusone.google.com//+1/confirm?hl=ru&url=URL&img=ImageUrl
i have also tried this but no success, may be i am trying wrong url. If somebody knows please share the URL here. Thanks.
Upvotes: 1
Views: 649
Reputation: 28742
I have hit the same snag also. You cannot use a +1 with your own functions or callers. You need to use the google code to make that happen.
What you can do however is use a javascript share window to pass your own parameters.
This is what I use.
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)
}
The resulting url is a new window opened with the 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
if you wish to use google's +1 button I suggest using microformats in your website
https://support.google.com/webmasters/answer/146897?hl=en
Upvotes: 3
Reputation: 24581
try to use og:image
meta-property:
<meta property="og:image" content="http://mylink.com/myimg.png">
see, it works on my webpage
Upvotes: 1