meta property=og标签含义及作用

Meta Property=og标签是什么呢? 5 `: `0 U3 z& e2 i0 |8 O; R8 E( C

  og是一种新的HTTP头部标记,即Open Graph Protocol:
) F' e' P8 w2 a3 c  F# t3 f
  The Open Graph Protocol enables any web page to become a rich object in a social graph.

  即这种协议可以让网页成为一个“富媒体对象”。 5 E1 A5 ~7 k- F' q$ n
- e% v9 v  t/ U; m* x8 k
  用了Meta Property=og标签,就是你同意了网页内容可以被其他社会化网站引用等,目前这种协议被SNS网站如Fackbook、renren采用。 8 q  Y1 v6 @0 h. r
3 f) R" n8 ?! R" }& }
  SNS已经成为网络上的一大热门应用,优质的内容通过分享在好友间迅速传播。为了提高站外内容的传播效率,2010年F8会议上Facebook公布了一套开放内容协议(Open Graph Protocol),任何网页只要遵守该协议,SNS就能从页面上提取最有效的信息并呈现给用户。

2 H* F9 M! b' O! i" g0 m, o
0 r% @; B! l4 K  J+ G& B
Open Graph Protocol应用指南
参与到Open Graph Protocol的好处
  ● 能够正确的分享您的内容到SNS网站 & j$ H$ y% h$ h5 m' p
' e) _6 @6 q, T+ f# I& \* S" ^
  ● 帮助您的内容更有效的在SNS网络中传播 + h; h  f0 E* }: Y4 N# v% b) n0 B
; V% b4 A6 ^( f! G. O
Meta Property标签的应用 9 i0 Y+ m/ c9 Y# L& M
  ● 按照您网页的类型,在<head>中添加入meta标签,并填上相应的内容

  ● 如果一个页面上有多个需要标识出的内容怎么办? 3 `" ~; _6 e; j2 p& Z: {
! B0 v9 Q( ]; R# \9 @1 _. B! ^
  您可以重复meta标签,将认为og:type 标签是每一段内容的起始处,例如:
# Z; @1 {: X9 X8 C% H2 t
  <meta property="og:type" content="video"/> 
1 U/ B9 A: b" r  G& H* H! k
  <meta property="og:title" content="五月天_突然好想你MV现场版"/> # W4 [6 z& ~" H1 V6 q

  <meta property="og:image" content="http://g1.ykimg.com/0100641F464AC21FF0B3ED00F48F151F43D4BF-5F0F-BD39-76EA-E5E20A1887C4"/> ; d& S* x1 S" d- t/ \2 k  i/ e+ L& n# a

  <meta property="og:url" content="http://v.youku.com/v_show/id_XMTIyMTY5NzMy.html"/> 

  <meta property="og:videosrc" content="http://player.youku.com/player.php/sid/XMTIyMTY5NzMy&isAutoPlay=true/v.swf"/>   H) C9 U6 M, g5 A. U' ]

  <meta property="og:width" content="500″ /> 

  <meta property="og:height" content="416″ />  ' W* g7 ~( u7 M7 c3 J

  <meta property="og:type" content="video"/> 
6 u9 r/ D8 F7 t
  <meta property="og:title" content="五月天_突然好想你MV现场版_AA"/>  / O( X" O+ p" H$ l3 o4 ?% f
" f; K* B& D, [( E1 _7 P) @5 N
  <meta property="og:image" content="http://g1.ykimg.com/0100641F464AC21FF0B3ED00F48F151F43D4BF-5F0F-BD39-76EA-E5E20A1887C44444"/>  ! G8 r5 w  J/ p+ a
4 @. Q$ V8 V' W/ M  ~$ |# I
  <meta property="og:url" content="http://v.youku.com/v_show/id_XMTIyMTY5NzMyyyyyyyyyyyyyyyy.html"/> 

  <meta property="og:videosrc" content="http://player.youku.com/player.php/sid/XXXXXXXXXXXXMTIyMTY5NzMy&isAutoPlay=true/y.swf"/> 

  <meta property="og:width" content="600" /> 

  <meta property="og:height" content="716"/>  : z4 X) o; b% E( L% F5 y
0 h+ z* C, b& Z6 f/ |, Q
  ● 安装SNS网站插件如人人网插件,同样会出现Meta Property标签,卸载后可以去除。

( R1 Q. {, R2 S
使用Open Graph Protocol应注意 5 v# Y9 C" |1 S& k& t9 J
  meta property=og代码的功能并不等同于网页的meta name标签,两者针对的对象不一致,功能不同。

  如果网站上要使用Open Graph Protocol,那么,meta property=og和meta name、Title标签应同时赋值。 3 _7 a' ^- ^- ?

  文章开头举例的B2C网站,<head>如下: ' _; |4 C% ]6 k; D9 L3 }3 g& K: U
! f: M" Z( x* ^* p0 [
  <head>  " V9 c0 i  z# }( R+ X# |

  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 
+ @% g! }& j' d% D
  <title>Cool Gadgets at the Right Price - Worldwide Free Shipping - ******</title> 
% v6 u, v8 x7 T
  <meta property="og:title" content="**’sFacebook" /> 
8 N$ H& d9 ]4 n+ F, R4 p
  <meta property="og:type" content="product"/>  / Z) |; G7 `6 y

  <meta property="og:url" content="http://www.******.com" /> 
- u  t1 K* A5 T$ w4 i
  <meta property="og:image" content="http://www.******.com/logo.gif"/> 
  u# I) W- }$ j: @$ Q9 ~  f3 u" `
  <meta property="og:site_name" content="******.COM" />  4 a' r5 X- B. h$ h. K' a% U0 M
% r  d0 \# v9 W6 d
  <meta property="og:description" content="CoolGadgets at the RightPrice - Worldwide Free Shipping - ******"/> ! {0 _3 r6 F6 o& {7 i9 ]% Z6 W; ?) M
$ }3 }: d  X4 O' k
  <meta property="fb:admins" content="100001422224225" /> 
( y/ r+ |: s" |" |' p+ p5 {
  <meta property="fb:page_id" content="241333394220"/>  , H& w  t" w3 N/ y& ^6 i

  <link href="/css/reset.css" rel="stylesheet"type="text/css" /> 

  <link href="/css/default/all.16666.css" rel="stylesheet" type="text/css" />  - E& V5 [# K6 k8 q' p
, i: y: N2 m$ y6 U+ ?0 i
  <script type="text/javascript" src="/shop.js"></script>  % \' [; ^& G  Z9 m+ i: p
3 i4 u7 U4 |/ {+ `& m
  <script type="text/javascript" src="/scripts/all.16666.build.js"></script>  : N* L6 r0 }6 Z& c; L! O- S! p" J
0 m0 ^* O+ P* x* L' n  p
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 

  <meta name="description" content="Online shopping for cool gadgets at the right price. " /> 
) N' x& u/ E8 k: B7 V, M; i8 V
  <meta name="keywords" content="cool gadgets, cheap gadgets, free shipping" />  / C; `! P2 r& [; w. c: K

  </head> 
6 Y; a+ u2 X, ~9 P; \6 n! a4 G0 i
  如果你用上了Meta Property标签,你得在后台设置好,不然,就是空白. $ C& {- {$ q4 @! C8 m, W9 J2 z" `& d0 }
" f2 V& c$ H3 |* x" V( A5 y# z0 O

  ]$ `4 m$ t6 U' a
Open Graph Protocol对SEO的影响
  有些人使用所谓的网站质量在线检测,检测后结果提示Meta Property=og这段代码有问题,特别是一些SEO的检测,更是提示“特别错误”!然后删除Meta Property=og代码,检测正常。

  因此担心Meta Property=og这段代码会对网站照成不良影响。

  其实Open Graph Protocol并不会对SEO照成不良影响,相反,应用的合理,非常有利于网站的推广。
<!doctype html> <html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>汉的解释|汉的意思|汉典“汉”字的基本解释</title> <meta name="title" content="汉的解释|汉的意思|汉典“汉”字的基本解释"> <meta name="keywords" content="左:氵,右:又。" /><meta property="og:title" content="“汉”字的解释 | 汉典" /> <meta property="og:image" content="//www.zdic.net/images/logo-zh-cn.png" /> <meta property="og:description" content="“汉”字的解释,释义,异体字,音韵方言,部首笔画,康熙字典,说文解字,字源字形" /> <meta name="description" content="“汉”字的解释,释义,异体字,音韵方言,部首笔画,康熙字典,说文解字,字源字形" /> <meta property="og:url" content="//www.zdic.net/hans/汉" /> <link rel="canonical" href="//www.zdic.net/hans/汉" /> <link rel="alternate" hreflang="x-default" href="//www.zdic.net/hans/汉" /> <link rel="alternate" hreflang="zh-Hans" href="//www.zdic.net/hans/汉" /> <link rel="alternate" hreflang="zh-Hant" href="//www.zdic.net/hant/汉" /> <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> <meta name="apple-mobile-web-app-title" content="汉典" /> <meta name="theme-color" content="#8b411c" /> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-161009-3"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-161009-3'); </script> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5789084355642416" crossorigin="anonymous"></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?3df9beb4da8d56b1d05ad32a8e6cf208"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <link type="text/css" rel="stylesheet" media="screen" href="/style.css" /
03-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值