本文介绍了Facebook在分享自己的页面时不会检测到视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站有许多视频页面。每个页面上只有一个视频。
当我在Facebook上分享其中一个页面的链接时,它不被视为视频,而只是标准文章。



缩略图,标题和描述很好地显示。但是,我不想显示缩略图,而是希望Facebook显示视频。



我正在使用作为视频播放器。



这是我的html标题:

 < meta property =og:titlecontent =页面标题/> 
< meta property =og:descriptioncontent =页面描述/>
< meta property =fb:adminscontent =ADMIN-ID/>
< meta property =fb:app_idcontent =APP-ID/>
< meta property =og:imagecontent =/ path / to / the / thumbnail.jpg/>
< meta property =og:typecontent =video/>
< meta property =og:urlcontent =www.domain.com/video.html/>
< meta property =og:videocontent =www.domain.com/video.mp4/>
< meta property =og:video:typecontent =video / mp4/>

而我的视频:

 < video id =video_1class =video-js vjs-default-skin shadow控件preload =autowidth =686height =386poster =path / to /the/poster.png\"> 
< source src =path / to / the / video.mp4type ='video / mp4'/>
< / video>

以下是Facebook调试工具信息:

  {
url:http:\ / \ / www.domaine.com\ / video.mp4,
type video \ / mp4,
width:686,
height:386
}

 状态:

视频嵌入在Facebook上启用

感谢您的帮助和理解,我是Facebook API的新手。 >

解决方案

您是否在OG元标记中为您的视频文件提供HTTPS URL?



您也需要HTTPS来源,因为大多数Facebook用户已经通过HTTPS上网(Facebook正在将其余部分移动到其中)。


I have a website with many video pages. There is only one video on each page.When i share a link of one of these pages on facebook, it is not considered as a video, but only a standard article.

Thumbnail, Title and Decription are well displayed. But instead of displaying the thumbnail, i would like Facebook to display the video.

I'm using videoJS as video player.

Here is my html header:

<meta property="og:title" content="Page Title" />
<meta property="og:description" content="Page Description" />
<meta property="fb:admins" content="ADMIN-ID" />
<meta property="fb:app_id" content="APP-ID" />
<meta property="og:image" content="/path/to/the/thumbnail.jpg" />
<meta property="og:type" content="video" />
<meta property="og:url" content="www.domain.com/video.html" />
<meta property="og:video" content="www.domain.com/video.mp4" />
<meta property="og:video:type" content="video/mp4" />

And my video :

<video id="video_1" class="video-js vjs-default-skin shadow"  controls preload="auto" width="686" height="386" poster="path/to/the/poster.png">
 <source src="path/to/the/video.mp4" type='video/mp4' />
</video>

Here are the Facebook Debug Tool informations :

{
   "url": "http:\/\/www.domaine.com\/video.mp4",
   "type": "video\/mp4",
   "width": 686,
   "height": 386
}

and

status :

Video embedding on Facebook enabled 

Thanks for your help and your comprehension, i'am a newbe in Facebook API.

解决方案

Do you have HTTPS URLs for your video files in the OG meta tags as well?

You will need HTTPS sources as well, since most Facebook users surf over HTTPS already (and Facebook is in the process of getting the rest of them there).

这篇关于Facebook在分享自己的页面时不会检测到视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 09:58