<meta property="og:需要写的标签"的应用

代码:

<meta property="og:title" content="Pack is for people who love their dogs." />
<meta property="fb:app_id" content="370495083058038" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Pack" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="http://packdog.com/" />
<meta property="og:image" content="http://packdog.com/static/facebook.jpg" />
<meta property="og:description" content="Pack is the new home to capture and share the everyday moments in your dog’s life." />


Meta Property=og标签是什么呢?

og是一种新的HTTP头部标记,即Open Graph Protocol:

The Open Graph Protocol enables any web page to become a rich object in a social graph.

即这种协议可以让网页成为一个“富媒体对象”。

用了Meta Property=og标签,就是你同意了网页内容可以被其他社会化网站引用等,目前这种协议被SNS网站如Fackbook、renren采用。

SNS已经成为网络上的一大热门应用,优质的内容通过分享在好友间迅速传播。为了提高站外内容的传播效率,2010年F8会议上Facebook公布了一套开放内容协议(Open Graph Protocol),任何网页只要遵守该协议,SNS就能从页面上提取最有效的信息并呈现给用户。


Open Graph Protocol应用指南

参与到Open Graph Protocol的好处

● 能够正确的分享您的内容到SNS网站

● 帮助您的内容更有效的在SNS网络中传播

Meta Property标签的应用

● 按照您网页的类型,在<head>中添加入meta标签,并填上相应的内容

● 如果一个页面上有多个需要标识出的内容怎么办?

您可以重复meta标签,将认为og:type 标签是每一段内容的起始处,例如:

<meta property=”og:type” content=”video”/>

<meta property=”og:title” content=”五月天_突然好想你MV现场版”/>

<meta property=”og:image” content=”http://g1.ykimg.com/0100641F464AC21FF0B3ED00F48F151F43D4BF-5F0F-BD39-76EA-E5E20A1887C4″/>

<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”/>

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

<meta property=”og:height” content=”416″ />

<meta property=”og:type” content=”video”/>

<meta property=”og:title” content=”五月天_突然好想你MV现场版_AA”/>

<meta property=”og:image” content=”http://g1.ykimg.com/0100641F464AC21FF0B3ED00F48F151F43D4BF-5F0F-BD39-76EA-E5E20A1887C44444″/>

<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″/>

● 安装SNS网站插件如人人网插件,同样会出现Meta Property标签,卸载后可以去除。

 

使用Open Graph Protocol应注意

meta property=og代码的功能并不等同于网页的meta name标签,两者针对的对象不一致,功能不同。

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

文章开头举例的B2C网站,<head>如下:

<head>

<meta http-equiv=”Content-Type” content=”text/html;charset=utf-8″ />

<title>Cool Gadgets at the Right Price – Worldwide Free Shipping – ******</title>

<meta property=”og:title” content=”**’sFacebook” />

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

<meta property=”og:url” content=”http://www.******.com” />

<meta property=”og:image” content=”http://www.******.com/logo.gif”/>

<meta property=”og:site_name” content=”******.COM” />

<meta property=”og:description” content=”CoolGadgets at the RightPrice – Worldwide Free Shipping – ******”/>

<meta property=”fb:admins” content=”100001422224225″ />

<meta property=”fb:page_id” content=”241333394220″/>

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

<link href=”/css/default/all.16666.css” rel=”stylesheet” type=”text/css” />

<script type=”text/javascript” src=”/shop.js”></script>

<script type=”text/javascript” src=”/scripts/all.16666.build.js”></script>

<meta http-equiv=”Content-Type” content=”text/html;charset=utf-8″ />

<meta name=“description” content=”Online shopping for cool gadgets at the right price. ” />

<meta name=“keywords” content=”cool gadgets, cheap gadgets, free shipping” />

</head>

如果你用上了Meta Property标签,你得在后台设置好,不然,就是空白.


原作者:http://gaoke0820.blog.163.com/blog/static/21664965201385104151396/



<!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、付费专栏及课程。

余额充值