Google +1 Generated Thumbmail in Profile

2019-02-03 14:54发布

问题:

When you press the google +1 button on a site it grabs the typical meta data such as title and description. I thought it might be looking for the first image in the first article tag, but I tried changing the image and the thumbnail did not change. Does anyone know how the thumbnail is generated? Can it be added as meta info (similar to facebook likes)? Can it be linted?

The thumbnail i'm talking about:

回答1:

There aren't any tools for developers on google+ yet.

You can subscribe for developer news

https://services.google.com/fb/forms/plusdevelopers/

API is available now



回答2:

http://www.google.com/intl/en/webmasters/+1/button/index.html

<!-- Update your html tag to include the itemscope and itemtype attributes -->
<html itemscope itemtype="http://schema.org/LocalBusiness">

<!-- Add the following three tags inside head -->
<meta itemprop="name" content="title of your content">
<meta itemprop="description" content="description">
<meta itemprop="image" content="image url">


回答3:

So... by the looks of it Google doesn't use the Open Graph Protocol http://ogp.me/ as their default information scrape.

For the image on the +1 listing they take the first useable image. The important part here is that even though on the +1 listing the image is resized to 45px x 45px the image you want to be used must be over 125px (at least). I'm using an image 180px x 180px (nice for scaling down to 45 x 45) and making sure it's the first large image on the page.

The title comes from the first h1 on the page and the description seems to come from the first paragraph; about 135 characters....



回答4:

meta og:image works, secret is to have image large enough. It failed at 140x112 and work when I change to bigger thumbnail 511x364



回答5:

Go to http://www.google.com/intl/en/webmasters/+1/button/index.html Make sure to set "HTML 5 valid syntax" if you are using HTML5. I got it to work.