国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

微博元標(biāo)記

微博元標(biāo)記 Weibo Meta Tags

微博元標(biāo)記,即Weibo Meta Tags,對(duì)Open graph協(xié)議下的常規(guī)meta tag進(jìn)行支持和兼容,并基于國(guó)情對(duì)OpenGraph不適用的對(duì)象類(lèi)型或?qū)傩赃M(jìn)行有限擴(kuò)展標(biāo)記。可以和OpenGraph一起使用。


為什么要配置Weibo Meta Tags?


傳統(tǒng)互聯(lián)網(wǎng)信息單元往往以Web Page為單位,以URL為線(xiàn)索進(jìn)行索引和流轉(zhuǎn)。通過(guò)定義Weibo Meta Tags,可以穿透Web Page,準(zhǔn)確索引互聯(lián)網(wǎng)上的Object,對(duì)互聯(lián)網(wǎng)上的內(nèi)容進(jìn)行格式化管理。擁有格式化的Object數(shù)據(jù),就可以為用戶(hù)提供靈活、擴(kuò)展性強(qiáng)、易讀的內(nèi)容展示模塊。


如何定義對(duì)象(Object)類(lèi)型?贊組件支持哪些對(duì)象(Object)類(lèi)型?

首先,你需要根據(jù)網(wǎng)頁(yè)所表述的內(nèi)容,定義這個(gè)網(wǎng)頁(yè)的對(duì)象類(lèi)型。


1、定義方式:

在你的網(wǎng)站頁(yè)面的<head>標(biāo)簽內(nèi),添加<meta>標(biāo)簽

HTML
<meta property="og:type" content="對(duì)象類(lèi)型" />

<meta name="weibo:type" content="對(duì)象類(lèi)型" />

定義對(duì)象類(lèi)型后,通過(guò)查詢(xún)對(duì)象屬性表,定義對(duì)象詳細(xì)屬性信息。


2、贊組件支持的對(duì)象類(lèi)型如下:

網(wǎng)頁(yè)(webpage)、文章(article)、音頻(audio)、圖片(image)、人(person)、地點(diǎn)(place)、產(chǎn)品(product)、視頻(video)、書(shū)(book)、游戲(game)、應(yīng)用(app)


如何定義Weibo Meta Tags

找到適合您網(wǎng)頁(yè)的對(duì)象類(lèi)型,通過(guò)對(duì)象屬性表查詢(xún)并設(shè)定屬性值,詳細(xì)的設(shè)定將帶來(lái)更好的效果,最后將代碼放入head中即可,下面列舉兩個(gè)部署實(shí)例進(jìn)行說(shuō)明


1、視頻對(duì)象Meta代碼實(shí)例:

將如下<meta>標(biāo)簽,方式網(wǎng)頁(yè)的<head>標(biāo)簽內(nèi)。

HTML
//必填
<meta property="og:type" content="video" />
<meta property="og:url" content="http://video.sina.com.cn/v/b/93544804-2282043583.html" />
<meta property="og:title" content="微博UDC圣誕賀歲視頻首發(fā)" />
<meta property="og:description" content="【微博UDC圣誕賀歲視頻首發(fā)!—微博帶你分享微快樂(lè)!】還有幾個(gè)小時(shí),圣誕節(jié)就要到啦!末日后的第一個(gè)圣誕大家準(zhǔn)備怎樣度過(guò)呢?2012我要新花樣?。。?!~趕快動(dòng)手制作一個(gè)圣誕 pinhole camera!! 和你最親近的那個(gè)TA一起分享微快樂(lè)吧!?。?quot; />
//選填
<meta property="og:image" content="http://ww2.sinaimg.cn/bmiddle/880538bfjw1e04w8ktfakj.jpg " />
<meta name="weibo:video:embed_code" content="http://you.video.sina.com.cn/api/sinawebApi/outplayrefer.php/vid=93544804_2282043583_OB21THcwCDTK+l1lHz2stqkP7KQNt6nni2K2u1anIAZaQ0/XM5GQYdgD5CHWBNkEqDhATZs6cfou1xk/s.swf" />
<meta name="weibo:video:stream" content="" />
<meta name="weibo:video:duration" content="47" />
<meta name="weibo:video:create_at" content="2012-12-24 16:26:05" />
<meta name="weibo:video:update_at" content="2012-12-24 16:26:05" />

以上代碼使用 OpenGraph 和 Weibo Meta Tags 混合方式,Weibo Meta Tags 目前支持五個(gè) OpenGraph 基礎(chǔ)屬性,即:


HTML
<meta property="og:type" content="類(lèi)型" />
<meta property="og:url" content="URL地址" />
<meta property="og:title" content="標(biāo)題" />
<meta property="og:image" content="圖片" />
<meta property="og:description" content="描述" />

以上OG屬性可與Weibo Meta Tags屬性直接互通使用。完全使用Weibo Meta Tag代碼格式實(shí)例如下:


HTML
//必填
<meta name ="weibo:type" content="video" />
<meta name ="weibo:video:url" content="視頻的URL地址" />
<meta name ="weibo:video:title" content="視頻的顯示名稱(chēng)" />
<meta name ="weibo:video:description" content="視頻的文字描述" />
//選填
<meta name ="weibo:video:image" content="視頻的縮略顯示圖片" />
<meta name="weibo:video:embed_code" content="視頻播放的嵌入代碼" />
<meta name="weibo:video:duration" content="視頻播放的時(shí)長(zhǎng),單位秒" />
<meta name="weibo:video:stream" content="視頻流的鏈接源" />
<meta name="weibo:video:create_at" content="用戶(hù)的創(chuàng)建時(shí)間" />
<meta name="weibo:video:update_at" content="用戶(hù)的更新時(shí)間" />


2、網(wǎng)頁(yè)對(duì)象Meta代碼實(shí)例:

將如下<meta>標(biāo)簽,方式網(wǎng)頁(yè)的<head>標(biāo)簽內(nèi)。

HTML


//必填
<meta property="og:type" content="webpage" />
<meta property="og:url" content="http://sports.sina.com.cn/nba/2012-12-26/06576353009.shtml" />
<meta property="og:title" content="圣誕戰(zhàn)總得分王!科比34+5寫(xiě)歷史 暴強(qiáng)數(shù)據(jù)16年第2" />
<meta property="og:description" content="科比-布萊恩特不出意料地拿下34分并成為了圣誕大戰(zhàn)史上得分王,不僅如此,這位34歲的神已連續(xù)9場(chǎng)比賽得分30+,創(chuàng)造了個(gè)人生涯第二好成績(jī)并向著2003年連續(xù)16場(chǎng)的壯舉繼續(xù)邁進(jìn)!" />
//選填
<meta property="og:image" content="http://i2.sinaimg.cn/ty/nba/2012-12-26/U4934P6T12D6353009F1286DT20121226070232.jpg" />
<meta name="weibo:webpage:create_at" content="2012-12-26 06:57:00" />
<meta name="weibo:webpage:update_at" content="2012-12-26 06:57:00" />

嚴(yán)格定義與非嚴(yán)格定義

下面A與B兩種格式,其中A為嚴(yán)格定義,B為非嚴(yán)格定義,區(qū)別就在于非嚴(yán)格定義可省略中間段。

A
HTML

weibo:video:embed_code
B
HTML
weibo:embed_code

當(dāng)明確定義了type對(duì)象類(lèi)型時(shí),可使用非嚴(yán)格定義,所有屬性均會(huì)被識(shí)別為當(dāng)前定義類(lèi)型;否則將不被識(shí)別。建議嚴(yán)格定義。


單個(gè)屬性的多值定義

單個(gè)屬性的多值定義即對(duì)某個(gè)對(duì)象屬性(即標(biāo)記)可同時(shí)賦予多個(gè)不同值,屬性值根據(jù)表現(xiàn)層產(chǎn)品需要按順序顯示。


方法:每行定義一個(gè)屬性,需要meta標(biāo)簽,同樣的屬性以及不同的賦值,按順序逐行定義。


示例:


HTML
image屬性定義多個(gè)值,即多張圖片
<meta property="og:image" content="示例圖片1" />
<meta property="og:image" content="示例圖片2 " />
<meta property="og:image" content="示例圖片3" />
<meta name="weibo:webpage: image" content="圖片示例4" />
<meta name="weibo:webpage: image" content="圖片示例5" />

注1:目前此方法僅對(duì)所有對(duì)象類(lèi)型image屬性開(kāi)放,其它屬性暫不支持。

注2:image屬性多值定義目前可用于分享窗口預(yù)置圖片。


對(duì)象(object)詳細(xì)屬性表

各個(gè)類(lèi)型的對(duì)象(object)下所含屬性對(duì)照表:


網(wǎng)頁(yè)(webpage)

image屬性定義多個(gè)值,即多張圖片
<meta property="og:image" content="示例圖片1" />
<meta property="og:image" content="示例圖片2 " />
<meta property="og:image" content="示例圖片3" />
<meta name="weibo:webpage: image" content="圖片示例4" />
<meta name="weibo:webpage: image" content="圖片示例5" />


代碼示例:


HTML
//必填
<meta property="og:type" content="webpage" />
<meta property="og:url" content="網(wǎng)頁(yè)唯一URL地址" />
<meta property="og:title" content="網(wǎng)頁(yè)標(biāo)題" />
<meta property="og:description" content="網(wǎng)頁(yè)描述" />
//選填
<meta property="og:image" content="網(wǎng)頁(yè)的顯示圖片" />
<meta name="weibo:webpage:create_at" content="網(wǎng)頁(yè)的創(chuàng)建時(shí)間" />
<meta name="weibo:webpage:update_at" content="網(wǎng)頁(yè)的更新時(shí)間" />


文章(article)

代碼示例:

QQ截圖20170210150706.png

HTML
//必填
<meta property="og:type" content="article" />
<meta property="og:url" content="文章的URL地址" />
<meta property="og:title" content="文章的顯示名稱(chēng)標(biāo)題" />
<meta property="og:description" content="文章的文字描述" />
//選填
<meta property="og:image" content="文章的顯示圖片" />
<meta name="weibo: article:create_at" content="文章的創(chuàng)建時(shí)間" />
<meta name="weibo: article:update_at" content="文章的更新時(shí)間" />


音頻(audio)

QQ截圖20170210151254.png

代碼示例:


HTML
//必填
<meta property="og:type" content="audio" />
<meta property="og:url" content="音頻的落地頁(yè)URL地址" />
<meta property="og:title" content="音頻的顯示名稱(chēng)" />
<meta property="og:description" content="音頻的文字描述" />
//選填
<meta property="og:image" content="音頻的顯示圖片" />
<meta name="weibo:audio:embed_code" content="音頻播放的HTML嵌入代碼" />
<meta name="weibo:audio:stream" content="音頻流的鏈接源" />
<meta name="weibo:audio:duration" content="音頻播放的時(shí)長(zhǎng),秒" />
<meta name="weibo:audio:create_at" content="音頻的創(chuàng)建時(shí)間" />
<meta name="weibo:audio:update_at" content="音頻的更新時(shí)間" />


視頻(video)

QQ截圖20170210151237.png

代碼示例:


HTML

//必填
<meta property="og:type" content="video" />
<meta property="og:url" content="視頻的URL地址" />
<meta property="og:title" content="視頻的顯示名稱(chēng)" />
<meta property="og:description" content="視頻的文字描述" />
//選填
<meta property="og:image" content="視頻的顯示圖片" />
<meta name="weibo:video:embed_code" content="視頻播放的HTML嵌入代碼" />
<meta name="weibo:video:stream" content="視頻流的鏈接源" />
<meta name="weibo:video:duration" content="視頻播放的時(shí)長(zhǎng),秒" />
<meta name="weibo:video:create_at" content="視頻的創(chuàng)建時(shí)間" />
<meta name="weibo:video:update_at" content="視頻的更新時(shí)間" />


圖片(image)

QQ截圖20170210151222.png

代碼示例:


HTML
//必填
<meta property="og:type" content="image" />
<meta property="og:url" content="圖片的URL地址" />
<meta property="og:title" content="圖片的顯示標(biāo)題" />
<meta property="og:description" content="圖片的文字描述" />
//選填
<meta property="og:image" content="圖片的縮略顯示圖" />
<meta property="weibo:image:full_image" content="圖片的原始大圖" />
<meta name="weibo:image:create_at" content="圖片的創(chuàng)建時(shí)間" />
<meta name="weibo:image:update_at" content="圖片的更新時(shí)間" />

說(shuō)明:og:image參數(shù)對(duì)應(yīng)weibo:image:image(縮略圖)和weibo:image:full_image(原始大圖),若需要區(qū)分縮略圖與原始大圖,請(qǐng)分別設(shè)定weibo:image:image和weibo:image:full_image,weibo標(biāo)記會(huì)覆蓋og標(biāo)記。


人(person)

QQ截圖20170210151209.png

代碼示例:


HTML
//必填
<meta property="og:type" content="image" />
<meta property="og:url" content="圖片的URL地址" />
<meta property="og:title" content="圖片的顯示標(biāo)題" />
<meta property="og:description" content="圖片的文字描述" />
//選填
<meta property="og:image" content="圖片的縮略顯示圖" />
<meta property="weibo:image:full_image" content="圖片的原始大圖" />
<meta name="weibo:image:create_at" content="圖片的創(chuàng)建時(shí)間" />
<meta name="weibo:image:update_at" content="圖片的更新時(shí)間" />


地點(diǎn)(place)

QQ截圖20170210151157.png

代碼示例:


HTML
//必填
<meta property="og:type" content="place" />
<meta property="og:url" content="地理位置的URL地址" />
<meta property="og:title" content="地理位置的顯示名稱(chēng)" />
<meta property="weibo:place:position" content="地理位置的坐標(biāo),經(jīng)+緯+海拔,符合ISO6709" />


商品(product)

QQ截圖20170210151144.png

代碼示例:


HTML
//必填
<meta property="og:type" content="product" />
<meta property="og:url" content="商品的URL地址" />
<meta property="og:title" content="商品的顯示名稱(chēng)標(biāo)題" />
<meta property="og:description" content="商品的文字描述" />
//選填
<meta property="og:image" content="商品的縮略顯示圖" />
<meta name="weibo:product:full_image" content="商品的原始大圖" />
<meta name="weibo:product:create_at" content="商品的創(chuàng)建時(shí)間" />
<meta name="weibo:product:update_at" content="商品的更新時(shí)間" />

說(shuō)明:og:image參數(shù)對(duì)應(yīng)weibo:product:image(縮略圖)和weibo:product:full_image(原始大圖),若需要區(qū)分縮略圖與原始大圖,請(qǐng)分別設(shè)定weibo:product:image和weibo:product:full_image,weibo標(biāo)記會(huì)覆蓋og標(biāo)記。


書(shū)(book)

QQ截圖20170210151132.png

代碼示例:


HTML
//必填
<meta property="og:type" content="book" />
<meta property="og:url" content="書(shū)的URL地址" />
<meta property="og:title" content="書(shū)的顯示名稱(chēng)" />
<meta property="og:description" content="書(shū)的文字描述" />
//選填
<meta property="og:image" content="書(shū)的顯示圖片" />
<meta name="weibo:book:isbn" content="書(shū)的10或13位數(shù)字的ISBN書(shū)號(hào)" />
<meta name="weibo:video:create_at" content="書(shū)的出版時(shí)間" />


游戲(game)

QQ截圖20170210151120.png

代碼示例:


HTML
//必填
<meta property="og:type" content="game" />
<meta property="og:url" content="游戲的URL地址" />
<meta property="og:title" content="游戲的顯示名稱(chēng)標(biāo)題" />
<meta property="og:description" content="游戲的文字描述" />
//選填
<meta property="og:image" content="游戲的縮略顯示圖" />
<meta name="weibo:game:image" content="游戲的原始大圖" />
<meta name="weibo:game:full_image" content="游戲的原始大圖" />
<meta name="weibo:game:create_at" content="游戲的創(chuàng)建時(shí)間" />

說(shuō)明:og:image參數(shù)對(duì)應(yīng)weibo:game:image(縮略圖)和weibo:game:full_image(原始大圖),若需要區(qū)分縮略圖與原始大圖,請(qǐng)分別設(shè)定weibo:game:image和weibo:game:full_image,weibo標(biāo)記會(huì)覆蓋og標(biāo)記。


應(yīng)用(app)

QQ截圖20170210151106.png

代碼示例:


HTML
//必填
<meta property="og:type" content="app" />
<meta property="og:url" content="應(yīng)用的URL地址" />
<meta property="og:title" content="應(yīng)用的顯示名稱(chēng)標(biāo)題" />
<meta property="og:description" content="應(yīng)用的文字描述" />
//選填
<meta property="og:image" content="應(yīng)用的顯示縮略圖" />
<meta name="weibo:app:full_image" content="應(yīng)用的原始大圖" />
<meta name="weibo:app:create_at" content="應(yīng)用的創(chuàng)建時(shí)間" />
<meta name="weibo:app:update_at" content="應(yīng)用的更新時(shí)間" />

說(shuō)明:og:image參數(shù)對(duì)應(yīng)weibo:app:image(縮略圖)和weibo:app:full_image(原始大圖),若需要區(qū)分縮略圖與原始大圖,請(qǐng)分別設(shè)定weibo:app:image和weibo:app:full_image,weibo標(biāo)記會(huì)覆蓋og標(biāo)記。