Facebook Player

Facebook Player#

The Facebook player component is used to play facebook videos directly on your website using the facebook player API.

Usage#

To use the react Facebook player component you have to import it from the reactjs-media module as FacebookPlayer

Example#

import React from "react";
import { FacebookPlayer } from "reactjs-media";
const MyVideo = () => {
return (
<>
<FacebookPlayer
src="https://www.facebook.com/facebook/videos/10153231379946729/"
width={650}
height={600}
/>
</>
);
};
tip

You dont have to load the Facebook SDK into your index.html file. the player will load the script immediately after it mounts to the DOM.