React Messenger Customer Chat
React component for Messenger customer chat plugin
Screenshot
Prerequisite
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
Installation
npm install react-messenger-customer-chat
Usage
;;; ReactDOM;
Note: It will handle sdk initialize automatically for you. See more details in Customer Chat Plugin official docs and Customer Chat SDK official docs.
Props
static propTypes = pageId: PropTypesstringisRequired appId: PropTypesstringisRequired shouldShowDialog: PropTypesbool htmlRef: PropTypesstring minimized: PropTypesbool themeColor: PropTypesstring loggedInGreeting: PropTypesstring loggedOutGreeting: PropTypesstring greetingDialogDisplay: PropTypes greetingDialogDelay: PropTypesnumber autoLogAppEvents: PropTypesbool xfbml: PropTypesbool version: PropTypesstring language: PropTypesstring debug: PropTypesbool onCustomerChatDialogShow: PropTypesfunc onCustomerChatDialogHide: PropTypesfunc; static defaultProps = shouldShowDialog: false htmlRef: undefined minimized: undefined themeColor: undefined loggedInGreeting: undefined loggedOutGreeting: undefined greetingDialogDisplay: undefined greetingDialogDelay: undefined autoLogAppEvents: true xfbml: true version: '2.11' language: 'en_US' debug: false onCustomerChatDialogShow: undefined onCustomerChatDialogHide: undefined;
Related
- react-messenger-checkbox - React component for messenger checkbox plugin.
- react-messenger-message-us - React component for messenger message us 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.
License
MIT © Yoctol