打开图:全局类型列表

Open graph: List of global types

我的用例

我正在为一个会议建立一个网站,具有用于 Facebook 和 Twitter 共享的 opengraph 属性。

validator表示og:type字段是必填项:

所以,我添加了一个字段:

<meta property="og:type" content="..." />

我的问题

我不确定我的内容类型是什么。 The manual states that:

In order for your object to be represented within the graph, you need to specify its type. This is done using the og:type property:

<meta property="og:type" content="website" />

When the community agrees on the schema for a type, it is added to the list of global types.

但是,我找不到 "global types" 的列表,而且我不确定我的会议网页是什么类型。

我的问题

在哪里可以找到开放图 object 的全局 object 类型列表?

这是 Open Graph Protocol 的网站:http://ogp.me/。其中 ogp 代表开放图谱协议。


说明

在此网站上,您可以看到所有 OGP object,并且可能 object 类型提供了对其用途的解释。


列表

在这个网站上,他们还讨论了 object 类型的全球列表。当社区接受全局 object 类型时,它会被添加到 The Global List。这表明实际上有一个(显然是虚拟的)全局 object 类型列表!但事实是您也可以自己创建一个!

这是 Facebook 的全球 object 类型列表:https://developers.facebook.com/docs/reference/opengraph/

还有 Schema (https://schema.org/) has a list of commonly used types. I would really recommend using Schema, since it’s used by Google to see how well you have documented your website (hence the name "Structured data")。Google 还提取给定的表格、搜索栏、网站的页面结构、ratings/reviews、产品和奖品以及更多。


例子

imdb.com: "The Lord of the Rings: The Fellowship of the Ring (2001)上随便看个电影。我们看到这里使用的标签:

<meta property='og:type' content="video.movie" />

现在,如果您在线搜索标题(让我们使用 Google),我们会看到演员表、持续时间、封面、类型、发行年份、票房。全部由Google.

收集

如今,imdb 使用 image 作为他们的 og:type。我确定为什么......也许他们希望 Google 以不同的方式获取他们的数据,或者 Google 不再使用 video.movie 类型(我将不得不做一些挖掘) .

另一个例子。 让我们在 Etsy.com and throw it in the Google's Structured Data Testing Tool 上搜索一个随机产品。我们看到Google就知道这是一个产品!因为他们有元标记:

<meta property="og:type" content="product" />

现在该产品很可能也会在 Google Shopping 中显示!


结论

我认为您需要问问自己为什么需要这个元标记及其属性。我总是把它放进去,但它总是说 website.

您可以自己创建这个全局 object 类型列表,或者使用您的 目标 (您的示例中的 Facebook)提供的类型。但这真的值得所有这些麻烦吗?我在没有它的情况下创建了许多网站,它们在 WhatsApp、Twitter 和 Facebook 上精美地预览了它们的链接!祝你好运。


阅读 this answer 了解有关元标记的更多信息!

og:Type Lists Of Objects

apps.saves An action representing someone saving an app to try later.

article This object represents an article on a website. It is the preferred type for blog posts and news stories.

book This object type represents a book or publication. This is an appropriate type for ebooks, as well as traditional paperback or hardback books. Do not use this type to represent magazines

books.author This object type represents a single author of a book.

books.book This object type represents a book or publication. This is an appropriate type for ebooks, as well as traditional paperback or hardback books

books.genre This object type represents the genre of a book or publication.

books.quotes Returns no data as of April 4, 2018.

An action representing someone quoting from a book.

books.rates Returns no data as of April 4, 2018.

An action representing someone rating a book.

books.reads Returns no data as of April 4, 2018.

An action representing someone reading a book.

books.wants_to_read Returns no data as of April 4, 2018.

An action representing someone wanting to read a book.

business.business This object type represents a place of business that has a location, operating hours and contact information.

fitness.bikes Returns no data as of April 4, 2018.

An action representing someone cycling a course.

fitness.course This object type represents the user's activity contributing to a particular run, walk, or bike course.

fitness.runs Returns no data as of April 4, 2018.

An action representing someone running a course.

fitness.walks Returns no data as of April 4, 2018.

An action representing someone walking a course.

game.achievement This object type represents a specific achievement in a game. An app must be in the 'Games' category in App Dashboard to be able to use this object type. Every achievement has a game:points value associate with it. This is not related to the points the user has scored in the game, but is a way for the app to indicate the relative importance and scarcity of different achievements: * Each game gets a total of 1,000 points to distribute across its achievements * Each game gets a maximum of 1,000 achievements * Achievements which are scarcer and have higher point values will receive more distribution in Facebook's social channels. For example, achievements which have point values of less than 10 will get almost no distribution. Apps should aim for between 50-100 achievements consisting of a mix of 50 (difficult), 25 (medium), and 10 (easy) point value achievements Read more on how to use achievements in this guide.

games.achieves An action representing someone reaching a game achievement.

games.celebrate An action representing someone celebrating a victory in a game.

games.plays An action representing someone playing a game. Stories for this action will only appear in the activity log.

games.saves An action representing someone saving a game.

music.album This object type represents a music album; in other words, an ordered collection of songs from an artist or a collection of artists. An album can comprise multiple discs.

music.listens Returns no data as of April 4, 2018.

An action representing someone listening to a song, album, radio station, playlist or musician

music.playlist This object type represents a music playlist, an ordered collection of songs from a collection of artists.

music.playlists Returns no data as of April 4, 2018.

An action representing someone creating a playlist.

music.radio_station This object type represents a 'radio' station of a stream of audio. The audio properties should be used to identify the location of the stream itself.

music.song This object type represents a single song.

news.publishes An action representing someone publishing a news article.

news.reads Returns no data as of April 4, 2018.

An action representing someone reading a news article.

og.follows An action representing someone following a Facebook user

og.likes An action representing someone liking any object.

pages.saves An action representing someone saving a place.

place This object type represents a place - such as a venue, a business, a landmark, or any other location which can be identified by longitude and latitude.

product This object type represents a product. This includes both virtual and physical products, but it typically represents items that are available in an online store.

product.group This object type represents a group of product items.

product.item This object type represents a product item.

profile This object type represents a person. While appropriate for celebrities, artists, or musicians, this object type can be used for the profile of any individual. The fb:profile_id field associates the object with a Facebook user.

restaurant.menu This object type represents a restaurant's menu. A restaurant can have multiple menus, and each menu has multiple sections.

restaurant.menu_item This object type represents a single item on a restaurant's menu. Every item belongs within a menu section.

restaurant.menu_section This object type represents a section in a restaurant's menu. A section contains multiple menu items.

restaurant.restaurant This object type represents a restaurant at a specific location.

restaurant.visited An action representing someone visiting a restaurant.

restaurant.wants_to_visit An action representing someone wanting to visit a restaurant

sellers.rates An action representing a commerce seller has been given a rating.

video.episode This object type represents an episode of a TV show and contains references to the actors and other professionals involved in its production. An episode is defined by us as a full-length episode that is part of a series. This type must reference the series this it is part of.

video.movie This object type represents a movie, and contains references to the actors and other professionals involved in its production. A movie is defined by us as a full-length feature or short film. Do not use this type to represent movie trailers, movie clips, user-generated video content, etc.

video.other This object type represents a generic video, and contains references to the actors and other professionals involved in its production. For specific types of video content, use the video.movie or video.tv_show object types. This type is for any other type of video content not represented elsewhere (eg. trailers, music videos, clips, news segments etc.)

video.rates Returns no data as of April 4, 2018.

An action representing someone rating a movie, TV show, episode or another piece of video content.

video.tv_show This object type represents a TV show, and contains references to the actors and other professionals involved in its production. For individual episodes of a series, use the video.episode object type. A TV show is defined by us as a series or set of episodes that are produced under the same title (eg. a television or online series)

video.wants_to_watch Returns no data as of April 4, 2018.

An action representing someone wanting to watch video content.

video.watches Returns no data as of April 4, 2018.

An action representing someone watching video content.