How to Facebook messenger use on wbsite chatbot

                        Facebook messenger use on wbsite chat


Go to the Facebook Developer page (https://developers.facebook.com/docs/messenger-platform/getting-started/app-setup/) and create a new Facebook App.

1.       On the App Dashboard, select Messenger > Settings and scroll down to the "Access Tokens" section.

2.       Generate a Page Access Token and copy it.

3.       Go to your website's HTML code and paste the following code within the <body> tags:

 

<!-- Load Facebook SDK for JavaScript -->

<div id="fb-root"></div>

<script>(function(d, s, id) {

  var js, fjs = d.getElementsByTagName(s)[0];

  if (d.getElementById(id)) return;

  js = d.createElement(s); js.id = id;

  js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0&appId=YOUR_APP_ID&autoLogAppEvents=1";

  fjs.parentNode.insertBefore(js, fjs);

}(document, 'script', 'facebook-jssdk'));</script>

 

<!-- Your live chat plugin code -->

<div class="fb-customerchat"

  attribution="setup_tool"

  page_id="YOUR_PAGE_ID"

  theme_color="#0084FF"

  logged_in_greeting="Hi! How can we help you today?"

  logged_out_greeting="Hi! How can we help you today?">

</div>

 

4.       Replace YOUR_APP_ID and YOUR_PAGE_ID with your App ID and Page ID respectively.

5.       Save and upload the updated HTML file to your server.

You should now see the Facebook Messenger chat window appear on your website, allowing visitors to initiate a chat with your Facebook page.


by_Online Source

Comments

Popular posts from this blog

Office Tool_SPSS v23 + Serial key

How to Fix FATAL error Failed to parse input Document ?

How to Reduce Lazy Load Resources

Popular posts from this blog

Office Tool_SPSS v23 + Serial key

How to Fix FATAL error Failed to parse input Document ?

How to Reduce Lazy Load Resources