wordpress视频插件_如何在WordPress中嵌入Facebook视频

wordpress视频插件

Do you want to embed a Facebook video in WordPress? With the recent popularity of Facebook Live and Facebook videos platform, several of our users asked if it was possible to embed Facebook videos in WordPress. In this article, we will show you how to easily embed a Facebook video and Facebook live video in WordPress.

您想在WordPress中嵌入Facebook视频吗? 随着Facebook Live和Facebook视频平台最近的流行,我们的一些用户询问是否可以将Facebook视频嵌入WordPress。 在本文中,我们将向您展示如何轻松地在WordPress中嵌入Facebook视频和Facebook实时视频。

How to embed Facebook video in WordPress
为什么要在WordPress中添加Facebook视频? (Why Add Facebook Videos in WordPress?)

We tell our users that they should never upload videos to WordPress. Instead, we recommend using a video sharing site like YouTube.

我们告诉用户,他们永远不要将视频上传到WordPress 。 相反,我们建议使用YouTube之类的视频共享网站。

While YouTube is currently the world’s largest video hosting platform, Facebook is the biggest social network, and their videos are growing fast.

YouTube是目前世界上最大的视频托管平台,而Facebook是最大的社交网络,其视频增长Swift。

Recently, Facebook introduced auto-play and Facebook live video features. Marketers all over the world are raving about these features because they increase user engagement and overall reach.

最近,Facebook推出了自动播放和Facebook实时视频功能。 全世界的营销人员都对这些功能赞不绝口,因为它们增加了用户的参与度和整体覆盖范围。

You can also use Facebook videos to increase likes on your Facebook page. For a more immersive social experience, you can add Facebook page plugin, install Facebook comments, and add Facebook like button on your WordPress site.

您还可以使用Facebook视频在Facebook页面上增加点赞。 为了获得更身临其境的社交体验,您可以在WordPress网站上添加Facebook页面插件安装Facebook评论添加Facebook like按钮

Having said that, let’s take a look at how to embed Facebook videos on a WordPress site.

话虽如此,让我们看一下如何将Facebook视频嵌入WordPress网站。

影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

在WordPress中嵌入Facebook视频 (Embedding Facebook Videos in WordPress)

First, you need to locate the video that you want to embed on your WordPress site.

首先,您需要找到要嵌入到WordPress网站上的视频。

Next, you need to right click on the video name or date, and then select copy link address.

接下来,您需要右键单击视频名称或日期,然后选择复制链接地址。

Copy the Facebook video URL

After that, you need to visit the Facebook embedded video player website and scroll down to the code generator section.

之后,您需要访问Facebook嵌入式视频播放器网站并向下滚动到代码生成器部分。

You will need to paste the URL you copied earlier in the ‘URL of video’ field.

您需要将先前复制的URL粘贴在“视频URL”字段中。

Facebook video embed code generator

Next, you need to click on the get code button which will bring up a popup showing you two boxes of code.

接下来,您需要单击获取代码按钮,这将弹出一个弹出窗口,向您显示两个代码框。

Embed code generator

The first part of the code needs to go in your website’s header section. There are multiple ways to add this code to your website.

代码的第一部分需要放在您网站的标题部分。 有多种方法可以将此代码添加到您的网站。

If you are comfortable editing theme files, then you can add it to your theme or a child theme by simply editing the header.php file and paste it right after the <body> tag.

如果您愿意编辑主题文件,则可以通过简单地编辑header.php文件并将其粘贴到<body>标记之后,将其添加到主题或子主题中

Alternatively, you can install and activate the Insert Headers and Footers plugin. For more details, see our step by step guide on how to install a WordPress plugin.

或者,您可以安装并激活“ 插入页眉和页脚”插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Upon activation, you need to go to the Settings » Insert Headers and Footers page in your WordPress admin and paste the code into the footer box. Click on the save button to store your changes.

激活后,您需要转到WordPress管理员中的“设置»插入页眉和页脚”页面,并将代码粘贴到页脚框中。 单击保存按钮以存储您的更改。

Important: You only need to add the first part of the code once. Next time you add a Facebook video, you will only need to copy and paste the second part of the code.

重要提示:您只需要添加一次代码的第一部分。 下次添加Facebook视频时,只需复制并粘贴代码的第二部分。

Now return to the Facebook video embedder page and copy the second part of the code.

现在返回Facebook视频嵌入页面,并复制代码的第二部分。

You can add this code in your WordPress posts, pages, or even a sidebar widget. When adding the code to your posts and pages, you need to make sure to switch to the Text editor, otherwise WordPress visual editor will mess up the code.

您可以在WordPress帖子,页面甚至侧边栏小部件中添加此代码。 在将代码添加到帖子和页面时,您需要确保切换到文本编辑器 ,否则WordPress可视编辑器会弄乱代码。

Switch to text editor to paste video embed code

You can now visit your website to see the Facebook video in action.

现在,您可以访问您的网站以观看Facebook视频。

Facebook video embed preview
如何在WordPress中嵌入Facebook Live视频 (How to Embed Facebook Live Video in WordPress)

You can embed the Facebook Live video just like you would embed a regular Facebook video. The only difference here is how to get the URL of your Facebook live video.

您可以嵌入Facebook Live视频,就像嵌入常规Facebook视频一样。 唯一的区别是如何获取您的Facebook实时视频的URL。

Facebook doesn’t allow you to get a URL for your live video before you go live. If you want to simultaneously broadcast the Facebook Live video on your website, then you will need to first go live.

Facebook不允许您在直播之前获取直播视频的URL。 如果要在网站上同时广播Facebook Live视频,则需要首先上线。

Once you are live, right click on the date and select copy link address to get the live video URL.

直播后,右键单击日期,然后选择复制链接地址以获取直播视频URL。

Getting your Facebook Live video URL

Once you have the URL, you can go to the Facebook embedded video player website and paste the link in the ‘URL of video’ field.

拥有网址后,您可以转到Facebook嵌入式视频播放器网站,然后将链接粘贴到“视频的网址”字段中。

Facebook Live video embed code generator

The video embed code generator will now fetch and display a preview of your Facebook live video. You need to click on the Get Code button to continue and follow the instructions described above to add these codes to your website.

视频嵌入代码生成器现在将获取并显示您的Facebook实时视频的预览。 您需要单击“获取代码”按钮以继续,并按照上述说明将这些代码添加到您的网站。

Once you have added the Facebook live video code to your site, your users will be able to view the Facebook live video directly from your website as well as their Facebook feeds.

将Facebook实时视频代码添加到您的网站后,您的用户将能够直接从您的网站以及他们的Facebook feed观看Facebook实时视频。

Facebook live video preview

We hope this article helped you learn how to embed Facebook videos in WordPress. You may also want to see our guide on how to get more visitors to your new WordPress website.

我们希望本文能帮助您学习如何将Facebook视频嵌入WordPress。 您可能还想查看我们的指南,该指南如何使更多的访客访问您的新WordPress网站

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-embed-a-facebook-video-in-wordpress/

wordpress视频插件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值