ElkArte Community

Project Support => Support => Topic started by: Jason on May 20, 2018, 03:14:32 am

Title: Google Plus Image Grabber
Post by: Jason on May 20, 2018, 03:14:32 am
When i post a link in my Google Plus community i get an unknown image, how to replace this image? (near the PC Power Supply)

(Link-5820)
Title: Re: Google Plus Image Grabber
Post by: emanuele on May 20, 2018, 09:25:35 am
I'm not sure, I don't use google plus (nor other social networks), it may be it looks for some "og" meta tag or similar, try looking at g+ documentation and see if you can find what it looks for. After that it may be possible to come up with a solution.
Title: Re: Google Plus Image Grabber
Post by: Jason on May 20, 2018, 09:55:31 am
Ok, i will check with Google Plus and come back

"The og:image meta tag is being used by google plus rather than the image property"

Hope this gives some insight on it - https://developers.google.com/+/web/snippet/
Title: Re: Google Plus Image Grabber
Post by: emanuele on May 20, 2018, 03:18:36 pm
Well, then something like:
Code: [Select]
<meta property="og:image" content="' . $context['favicon'] . '" />


after:
Code: [Select]
<link rel="shortcut icon" sizes="196x196" href="' . $context['favicon'] . '" />
in index.template.php should do.
Title: Re: Google Plus Image Grabber
Post by: ahrasis on May 21, 2018, 02:11:49 am
You may take a view at my simple site source if you like, here (https://ip.sch.my/), where I cover twitter as well.
Title: Re: Google Plus Image Grabber
Post by: Jason on May 21, 2018, 12:36:46 pm
Thank you so much for the code, it works perfectly.