File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
packages/embed-plugin-facebook Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ # embed-plugin-facebook
2+
3+ A plugin that can be used to embed facebook posts/videos.
4+
5+ ## Installation
6+ ```
7+ npm i -S embed-js embed-plugin-facebook
8+ ```
9+
10+ ### CDN
11+
12+ https://unpkg.com/embed-plugin-facebook
13+
14+ ## Usage
15+
16+ [ ![ Edit embed.js - facebook] ( https://codesandbox.io/static/img/play-codesandbox.svg )] ( https://codesandbox.io/s/7jx90or24x )
17+
18+ ``` js
19+ import EmbedJS from ' embed-js'
20+ import facebook from ' embed-plugin-facebook'
21+
22+ const x = new EmbedJS ({
23+ input: document .getElementById (' element' ),
24+ plugins: [
25+ facebook ({
26+ regex: / facebookPostRegex/ gi , // in case you want to define a custom regex
27+ template (args ) {
28+ // optional template
29+ }
30+ })
31+ ]
32+ })
33+ ```
34+ When you click on the link URL, it redirects you to the post URL.
35+
36+ ### License
37+ MIT @ Ritesh Kumar
You can’t perform that action at this time.
0 commit comments