embed-plugin-facebook

5.0.4 • Public • Published

embed-plugin-facebook

A plugin that can be used to embed facebook posts/videos.

Installation

npm i -S embed-js embed-plugin-facebook

CDN

https://unpkg.com/embed-plugin-facebook

Usage

Edit embed.js - facebook

import EmbedJS from 'embed-js'
import facebook from 'embed-plugin-facebook'
 
const x = new EmbedJS({
  input: document.getElementById('element'),
  plugins: [
  facebook({
    regex: /facebookPostRegex/gi, // in case you want to define a custom regex
    template(args) {
      // optional template
    }
   })
 ]
})

When you click on the link URL, it redirects you to the post URL.

License

MIT @ Ritesh Kumar

Readme

Keywords

none

Package Sidebar

Install

npm i embed-plugin-facebook

Weekly Downloads

192

Version

5.0.4

License

MIT

Unpacked Size

54.4 kB

Total Files

9

Last publish

Collaborators

  • ritz078