https://livechat-1.netlify.app
Open your React project or create
Open your terminal and install
npm i react-messenger-customer-chat
Create one page like: LiveChat.jsx
Paste this code in your "LiveChat" page
import React from 'react'
import MessengerCustomerChat from 'react-messenger-customer-chat';
const LiveChat = () => {
return (
<div>
<MessengerCustomerChat
pageId="Enter your Page id"
appId="Enter your App id"
/>,
</div>
)
}
export default LiveChat
Note: If you have any problem to find Facebook page ID and APP Id, you can search google or YouTube
"How to Find Facebook Page Id"
"How to create facebook app id"
Link your "LiveChat page" in "App.jsx" page
Run this command:
npm run build
Deploy your website to your domain/Firebase or Netlify
Copy your Website URL
Go to your Facebook page>Settings>Advanced Messaging> Whitelisted domains option and add your website URL in input field and click add button
Go to your website and Reload, you will see messenger icon and you can chat