OG.页面上有1个以上的视频 [英] OG. More than 1 video on page

查看:62
本文介绍了OG.页面上有1个以上的视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为放置在页面上的多个视频添加OG标记?我需要一个例子.

How can I add OG markup for more than 1 video, placed on a page? I need an example please.

我为1个视频添加了标记,但不知道如何为2个或更多视频做标记.

I had added markup for 1 video but have no idea how to do it for 2 or more.

推荐答案

只需将带有必要参数的 video 标签放入您需要的次数.

Just put video tags with necessary params as many times as you need.

示例.

这样的标记

        <meta property="og:video" content="http://example.com/movie.swf" />
        <meta property="og:video:secure_url" content="https://secure.example.com/movie.swf" />
        <meta property="og:video:type" content="application/x-shockwave-flash" />

        <meta property="og:video" content="http://example.com/movie1.swf" />
        <meta property="og:video:secure_url" content="https://secure.example.com/movie1.swf" />
        <meta property="og:video:type" content="application/x-shockwave-flash" />

        <meta property="og:video" content="http://example.com/movie2.swf" />
        <meta property="og:video:secure_url" content="https://secure.example.com/movie2.swf" />
        <meta property="og:video:type" content="application/x-shockwave-flash" />

将给您(在 Facebook对象调试器中)

与数组有关的所有内容(您可以在文档此处中潜水)

It's all about arrays (you can dive in the doc here)

数组

如果标签可以有多个值,只需放置多个版本 页面上相同的<meta>标记.第一个标签 (从上到下)在冲突期间会得到优先选择.

Arrays

If a tag can have multiple values, just put multiple versions of the same <meta> tag on your page. The first tag (from top to bottom) is given preference during conflicts.


<meta property="og:image" content="http://example.com/rock.jpg" /> 
<meta property="og:image" content="http://example.com/rock2.jpg" />

在声明其根标记后放入结构化属性. 每当解析另一个根元素时,该结构化属性即为 被认为已经完成,又开始了.

Put structured properties after you declare their root tag. Whenever another root element is parsed, that structured property is considered to be done and another one is started.

例如:


<meta property="og:image" content="http://example.com/rock.jpg"/>
<meta property="og:image:width" content="300" /> 
<meta property="og:image:height" content="300" />  
<meta property="og:image" content="http://example.com/rock2.jpg" />
<meta property="og:image" content="http://example.com/rock3.jpg" />
<meta property="og:image:height" content="1000" />

表示此页面上有3张图片,第一张图片是 300x300,中间的一个未指定尺寸,并且 最后一个是1000 px高

means there are 3 images on this page, the first image is 300x300, the middle one has unspecified dimensions, and the last one is 1000px tall.

这篇关于OG.页面上有1个以上的视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆