How do I embed a facebook send button in my react app?
<p>I have a client side rendered react app. I want to display a facebook send button on my page.</p>

<p>The instructions given on the developer page do not tell me how to do it</p>

<p><a href="https://developers.facebook.com/docs/plugins/send-button#configurator" rel="noreferrer">https://developers.facebook.com/docs/plugins/send-button#configurator</a></p>

<p>Plus, I did not find an npm compatible package released by facebook for their SDK. So how does one go about including the SDK in a react app?</p>

<p>EDIT: I tried using some async loader in react.</p>

<pre><code>import React, { Component } from 'react';
import scriptLoader from 'react-async-script-loader';

@scriptLoader(
  'https://connect.facebook.net/es_ES/sdk.js#xfbml=1&amp;version=v2.5',
)
class FacebookSendButton extends Component {

  componentDidMount() {
    const { isScriptLoaded, isScriptLoadSucceed } = this.props;
    if (isScriptLoaded &amp;&amp; isScriptLoadSucceed) {
      console.log('script load success from didMount');
    }
  }

  componentWillReceiveProps({ isScriptLoaded, isScriptLoadSucceed }) {
    if (isScriptLoaded &amp;&amp; !this.props.isScriptLoaded) { // load finished
      if (isScriptLoadSucceed) {
        console.log('script load success from receiveProps');
      }
    }
  }

  render() {
    return (

      &lt;div&gt;
       BEFORE FB ROOT.
      &lt;div className="fb-send"
        dataHref="http://www.your-domain.com/your-page.html"
        dataLt ayout="button_count"
      /&gt;
      &lt;div id="fb-root"&gt;&lt;/div&gt;
    &lt;/div&gt;
    );
  }
}

export default FacebookSendButton;
</code></pre>

<p>This does not render a facebook send button.</p>