Quay lại phần Tin tức dành cho nhà phát triển

Embeds

14 tháng 12, 2015Tác giảLucas Cheon

People share and engage with videos, articles, posts and photos on Facebook every day. We're always looking for ways to make it easier for developers and publishers to use material from Facebook to make their websites more social and engaging for their audience. Today, we're introducing two new tools for embedding public videos and posts from Facebook: a new embedded video player API and support for the oEmbed standard.

Customization and Control: Embedded Video Player API

Earlier this year, we introduced an interactive embedded video player that brings Facebook videos to your site. Video is one of the most popular and engaging types of media for people, so are announcing an API for the Facebook Embedded Video Player. This API helps you embed videos on your site more easily and gives you more control, allowing you to customize the player to present videos in the way you want for your audience.

The new API includes the following features:

  1. Autoplay (With or Without Sound)
  2. Volume Control
  3. Playlists
  4. Player Controls
  5. Event & Error Handling
  6. Custom Buttons & Thumbnails

As always, you can still show synchronized view counts, giving you one source of truth on how many people watched your video.

Videos created using the API

The video platform company uStudio leveraged the new API to create two videos with customized overlays.

The Selena Gomez video player from Interscope Records is a fully customized version of the Facebook embed using the Facebook chromeless player. It features links to concert tickets, social sharing to Facebook pages and Instagram, as well as a way for fans to subscribe to the Selena Gomez email list.

The CES video player has simple overlays so people can register for the event or visit the hotel website where they can book a room. "The additional interactive features will allow our Facebook fans to be even more engaged than ever with the show, and we’re excited to be among the first organizations to use this new technology,” said Jeff Joseph, senior vice president, communications and strategic partnerships for Consumer Technology Association (CTA)™, the owner and producer of CES.

In the screencast below, we showcase the features of these two videos.


Embedding More Easily with oEmbed

oEmbed is an open standard that manages all the technical details required to embed things from Facebook, making it even easier to embed public articles, videos, and other posts from Facebook on your site by simply copying and pasting a URL.

Starting today, you can build oEmbed support for your CMS — for implementation details, please read our oEmbed documentation. Once your CMS supports oEmbed for Facebook, you and your clients can embed Facebook posts and videos quickly, with no need for screenshots or code changes.

These two new tools will improve your experience when bringing material from Facebook onto your site. Check out the embedded video player API documentation and oEmbed documentation to get started today.