OpenGraph 还是 Schema.org?

我只是想知道你们是否支持 OpenGraph 协议下面的标记,比如:

<meta property="og:title" content="The Rock" />
<meta property="og:type" content="movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />

或者 Schema.org 协议

<div itemscope itemtype="http://schema.org/Product">
<span itemprop="name">Kenmore White 17" Microwave</span>
<img src="kenmore-microwave-17in.jpg" alt='Kenmore 17" Microwave' />
<div itemprop="aggregateRating"
itemscope itemprop="http://schema.org/AggregateRating">

我应该积分哪一个,因为我认为只有1是必要的?[实际上你只能积分一个还是? ]

坦率地说,我认为 OpenGraph 对于整个代码库来说“不那么具有侵入性”——因为它更容易实现部分视图(使用 ASP.NET MVC) ,而 Schema.org 协议需要(至少在我看来)破坏性的 HTML 插件跨越你的代码?

编辑: 似乎我最终把两者都集成了——不确定这是否被允许,但 Schema.org 上的文档不清楚。值得注意的是,< a href = “ http://schema.org/docs/faq.html # 4”> 这个链接没有提供太多信息

问: Org 与 Facebook Open Graph 的关系如何?
Facebook Open Graph 很好地发挥了它的作用,但是 没有提供细节 信息搜索引擎需要 改善用户体验 网页可能有很多组件,而 它可能会谈论不止一件事情。 如果搜索引擎理解 一个页面的各种组件,我们可以 改进我们对数据的表达方式。 即使您使用 Facebook Open Graph 协议, Org 提供了一种机制 提供更多关于特殊情况的细节 页上的实体。 < br > 例如,a 关于乐队的页面可以包括任何或 以下各项:

  • 专辑列表
  • 每张专辑的价格
  • 每张专辑的歌曲列表,以及一个可以听到每首歌曲样本的链接
  • 即将举行的演出名单的乐队成员传记

所以我假设它们在一起是兼容的。

30222 次浏览

All depends if you're trying to markup your website for a social world (facebook) or search engines. Both are recommended but if you only have time for one then prioritize the company's marketing focus. OGP is huge for facebook, but does not have an ounce of use in SEO. Seo is completely reliant on micro-data and is the way for proper html5 creation.

HTML5Doctor on Microdata http://html5doctor.com/microdata/

Google talking about markup: http://www.google.com/support/webmasters/bin/answer.py?answer=1211158

Bing talking about markup: http://onlinehelp.microsoft.com/en-us/bing/hh207238.aspx


Update

For anyone finding this answer, a lot has changed since I first posted it. Schema.org is widely used by all major search engines and then some but the markup is now preferred to JSON-LD. Great article from SEO Skeptic outlining the change made by Google.

Google Structured Data provides documentation in JSON-LD and is greatly encouraged although RDFa and microdata is still partial supported.

JSON-LD should be used in conjunction with any social channels you are trying to target OGP for Facebook, Twitter Cards for Twitter, etc

They can both be used safely together. Currently the two efforts use different syntaxes to encode data in HTML (W3C RDFa or Microdata), but there are active discussions at W3C towards eventual convergence of those designs. Or greater compatibility, at least. Whether there will also be convergence at the vocabulary level between Schema.org and OGP, or services that consume both, remains to be seen. But in the meantime they both add value and can be safely combined.

So, to start with a couple of cliche's and mangled metaphors - we're talking apples and oranges a bit comparing OG and Schema.org, and when it comes to this metadata it's horses for courses.

The right answer depends on your intent, in adding metadata to your page. What is it that you're hoping to gain? What is the win for you here? The different forms of metadata are for slightly different purposes.

Google has made it clear that it's moving away from a focus on microformats and onto a focus on Schema.org in order to build rich-data results for search. If you want to optimize for Google, Bing and other search engines add the Schema.org markup. It's the direction HTML5 has stepped in.

Facebook OG markup is to be added if what you want is to benefit from turning your content into a social object and enable its multi-point connectivity to the social graph that is the Facebook universe.

In my experience most people are looking to gain from both approaches - do as well as they can in search rankings and increase reach and distribution through social channels. So, IMHO, it's probably best to be as thorough as possible adding the Schema.org markup where it fits your content and use Open Graph metadata. They do slightly different, but complementary things.

Google does favor schema, and open graph is better for web content that is related to social media. Your sample code looks good, but don't forget to include the prefix

<html prefix="og: http://ogp.me/ns#">

in the head of each page that has ogp.

You can check to make sure the ogp or schema works by using the rich snippet testing tool

http://www.google.com/webmasters/tools/richsnippets

In the case of Schema, you can check by using the SDTT: Structured Data Testing Tool

https://search.google.com/structured-data/testing-tool

RDFa og serves as uniform way to recognize content better by REST for consideration when embedding within containers not predicted at the time of creation. If the container is predetermined as search results, then schema.org microdata is well-understood by search bots. With og presentation is responsibility of container publisher & such quality freedom might improvise search ranking, while schema.org will improvise search result comprehensibility in the context of content creator's intent. The vocabularies usually are ignored when used with the competing semantic markup technique so best to use microdata with schema.org only and og with RDFa only. Both microdata and RDFa can coexist in same document.

We are talking about two separate concepts here: syntax and vocabulary.

The Open Graph Protocol and Schema.org are vocabularies. Other vocabularies are, for example, Dublin Core, FOAF, and SIOC.

These vocabularies are typically not coupled to a specific syntax. If you want to describe your content in HTML documents with such a vocabulary, you could use the syntaxes RDFa and/or Microdata.

Which one should I integrate as I think only 1 is necessary ? [actually can you only integrate one or ?]

Your first example uses Open Graph Protocol (= vocabulary) with RDFa (= syntax). Your second example uses Schema.org (= vocabulary) with Microdata (= syntax).

You can mix them up as you like. (You could use both vocabularies with both syntaxes on the same page. You could use both vocabularies with only one syntax. You could use only one vocabulary with both syntaxes, or with only one syntax. …). It totally depends on your specific use case.

What do you want to achieve? If you are interested in a specific 3rd party parsing your content, you should check their documentation. They typically support only certain vocabularies with certain syntaxes.

But if you want to mark up your content with semantic metadata without having a specific use case in mind, you could stick to one syntax and use whichever vocabularies are appropriate for your content. Personally, I’d choose RDFa (Lite). It is based on RDF, which works with other formats than HTML, too. It is a W3C Recommendation (Microdata is not). And most vocabularies you’ll find are defined in RDF(S). See my answer about the future of RDFa and Microdata.

Why not use json-ld for markup? I'm thinking of implementing json-ld based schema.org markup. That way it'll not be intrusive. My ghost blog uses it. Don't know if it's well supported by search engines yet. But all examples on schema.org now includes implementation for json-ld. see here http://schema.org/WebPage

And all my apps use twitter cards, fb opengraph tags and microformats tags like rel and structured schema.org metadata. And I find implementing schema.org metadata most instrusive. So replacing this last bit with json-ld and keeping code clean is nice. Too many tags and it's recommended to keep your html small ;)

rdfa(opengraph) and microdata(schema) cannot be used on same html page

"3) We’ll continue to support our existing rich snippets markup formats. If you’ve already done markup on your pages using microformats or RDFa, we’ll continue to support it. One caveat to watch out for: while it’s OK to use the new schema.org markup or continue to use existing microformats or RDFa markup, you should avoid mixing the formats together on the same web page, as this can confuse our parsers."

SRC: http://googlewebmastercentral.blogspot.in/2011/06/introducing-schemaorg-search-engines.html