React component for Messenger message us plugin
Whitelist your domain to connect your Facebook Page to your website via the Facebook tool.
- From UI: Facebook Page Settings > Messenger Platform > Whitelisted Domains
- From API: Use HTTP API or API client likes messaging-api-messenger
npm install react-messenger-message-us
import React from 'react';
import ReactDOM from 'react-dom';
import MessengerMessageUs from 'react-messenger-message-us';
ReactDOM.render(
<MessengerMessageUs pageId="<PAGE_ID>" appId="<APP_ID>" />,
document.getElementById('demo')
);
Note: It will handle sdk initialize automatically for you. See more details in fbsdk official docs.
static propTypes = {
pageId: PropTypes.string.isRequired,
appId: PropTypes.string.isRequired,
color: PropTypes.string,
size: PropTypes.string,
autoLogAppEvents: PropTypes.bool,
xfbml: PropTypes.bool,
version: PropTypes.string,
language: PropTypes.string,
debug: PropTypes.bool,
};
static defaultProps = {
color: 'blue',
size: 'large',
autoLogAppEvents: true,
xfbml: true,
version: '2.11',
language: 'en_US',
debug: false,
};
- react-messenger-customer-chat - React component for messenger customer chat plugin.
- react-messenger-checkbox - React component for messenger checkbox plugin.
- react-messenger-send-to-messenger - React component for messenger send to messenger plugin.
- messaging-api-messenger - Messaging APIs for Messenger.
- bottender - Make Bots in Your Way, Fast and Flexibly.
MIT © Yoctol