Skip to content

Commit 30736bd

Browse files
committed
docs(facebook): added readme
1 parent 51b3966 commit 30736bd

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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

0 commit comments

Comments
 (0)