[Resolved] Facebook Messenger

Home Forums Support [Resolved] Facebook Messenger

Home Forums Support Facebook Messenger

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #1197785

    Hello, i want to put Facebook Messenger un my website and Facebook send me a Code to put on muy web. They told me that i must to put on the body of the Pagés where i want yo use It. can i put this Code/script using a hook? If you think what i can do it… What hook i must to use? And can i use a hook for using Facebook Messenger with all the pages in mi website. Thanks a lot for your help in advance.

    This is the Facebook Messenger Code:

    <!– Load Facebook SDK for JavaScript –>

    window.fbAsyncInit = function() {
    xfbml : true,
    version : ‘v6.0’

    (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_GB/sdk/xfbml.customerchat.js&#8217;;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘facebook-jssdk’));</script>

    <!– Your customer chat code –>
    <div class=”fb-customerchat”
    logged_in_greeting=”Hi! How can we help you?”
    logged_out_greeting=”Hi! How can we help you?”>

    Customer Support

    Hi there,

    I believe the javascript code should go in the wp_footer hook:

    Then the <div> would go wherever you’d like the chat to appear:


    Thanks for the quick reply.

    Using gp hooks, I have put the complete code in one of the websites where you have told me; wp_footer and it has worked perfectly.
    However, on the other website I have, which is almost a clone of this one but with another domain name and very similar, same plugins… etc, it doesn’t work and facebook says that plugin must run with the two sites:

    “facebokk says”
    1. Confirm your website domain name appears
    The website domains listed below are able to display the customer chat plugin for EPM Pools & Construction. Ask Jack Cosson if you don’t see the website listed.

    https://epm-construction.com/en/home/, https://epmpools.com/en/home/

    2. Install the plugin
    Simply paste the code snippet below into your website code. We recommend placing the code after the opening <body> tag on pages where you want the plugin to appear.

    and the code explained above…..

    any ideas?

    Thanks a lot in advance again

    Lead Developer
    Lead Developer

    Hi there,

    The first message sounds like you haven’t confirmed ownership of the website. Have you taken all of the necessary steps with this second website?

    If they want the open after the opening <body> element, you should choose the wp_body_open hook.


    Thanks for your reply. Something wrong with Facebook adding the second site. You reír Tom. Thanks a lot

    Lead Developer
    Lead Developer
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.