-1

i just added Facebook Comment Plugin on my website created with NodeJS and ReactJS and this is generated code

<div id="fb-root"></div>
<script async defer crossOrigin="anonymous" 
src="https://connect.facebook.net/ka_GE/sdk.js#xfbml=1&version=v3.3"></script>\

<div className="fb-comments" data-href="http://localhost:3000/recipe/:id/:name" 
data-width="" data-numposts="5"></div>

but it does not shows anything on the page, i use chrome and i disabled adblock on that page but nothing changed anyway, what is the reason of this and how can I fix it? Thanks

iLiA
  • 3,053
  • 4
  • 23
  • 45

1 Answers1

0

You must use library react-facebook, in example :

import React, { Component} from 'react';
import { FacebookProvider, Comments } from 'react-facebook';

export default class Example extends Component {
  render() {
    return (
      <FacebookProvider appId="123456789">
        <Comments href="http://www.facebook.com" />
      </FacebookProvider>
    );
  }
}

You can find it at npmjs for more detail.

Le Quang
  • 515
  • 4
  • 10
  • thank you! but there is no info about appId prop and href prop which you wrote down in example and is appId given or should i use "123456789"? – iLiA Jun 15 '19 at 12:33
  • and should i change href? – iLiA Jun 15 '19 at 12:33
  • Yes, you are also mode `href` attribute . You can search `react-facebook` on `npmjs` for more detail. – Le Quang Jun 15 '19 at 15:53