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

    I’d like to add the Send To Messenger Plugin as my main Call to action on my website. It is a button that authentifies the user and sends her to Messenger, to start a conversation.

    https://developers.facebook.com/docs/messenger-platform/plugin-reference/send-to-messenger

    Can this be done? I want this button to be the main call to action, right under my tagline.

    Thanks a lot.

    #703133

    Hey antoninlivebotter,

    I’m not sure, did you try adding the code to a Code Block element? If you should need any further help then please post a link to your site.

    Best regards,
    Rikard

    #703201

    I tried adding a Code block but nothing appeared, I must have made errors. I added links to website+credentials

    Also, I’m not able to upload a logo with the right size, don’t know why haha!

    #704354

    Hi,

    Please add following code to Functions.php file in Appearance > Editor

    function av_send_to_messenger(){
    ?>
      <script>
    
        window.fbAsyncInit = function() {
          FB.init({
            appId: "APP_ID",
            xfbml: true,
            version: "v2.6"
          });
    
        };
    
        (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 = "//connect.facebook.net/en_US/sdk.js";
           fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));
    
      </script>
    <?php
    }
    add_action('wp_footer', 'av_send_to_messenger');

    Then add following code into text tab of Text Block element or Code Block element

    <div class="fb-send-to-messenger" 
      messenger_app_id="APP_ID" 
      page_id="PAGE_ID" 
      data-ref="PASS_THROUGH_PARAM" 
      color="blue" 
      size="standard">
    </div>   

    And change the attributes as needed

    Best regards,
    Yigit

    #704962

    Hey so I did all that but it didn’t work :(. The code block appears but there’s nothing in it.

    #704993

    Hey!

    It seems to be working fine on my end :)
    Please see screenshots in private content field below.

    Cheers!
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.