Support » Plugin: Customer Chat for Facebook » How to “No FB icon” in bottom right corner until “chat” will be clicked

  • Resolved edmunek

    (@edmunek)


    Hi

    I am fighting with this already for several days, but based on the fact that I suck in coding, I don’t really know how to do it.
    I want to achieve, that the fb chat icon will only be loading, once the customer will click “Chat” custom button ([ccfb_toggle class=”btn btn-default”]Chat[/ccfb_toggle]).
    I have only found following info:

    “For the plugin to stay hidden on initial page load, you have to set xfbml as false when initializing the SDK. ”
    This can be found in wp-content/plugins/customer-chat-for-facebook/public/class-customer-chat-for-facebook-public.php in line 144
    however I don’t know how to implement this:
    “Then you can call FB.XFBML.parse() to control when Customer Chat is loaded.”

    Would you be able to assist?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author thatguysam

    (@thatguysam)

    Facebook’s Customer Chat doesn’t work inside fiddle but you could try a modification of the plugins code like this: https://jsfiddle.net/thatguysam/s3pwqbg0/

    I’ll add this to the list of requested features for future releases.

    Hmm.. I have kind of copied and pasted the code you have given me,
    changing the page_id and making sure that code is loaded,
    but it does not work

    Console only throws:

    Uncaught TypeError: Cannot read property ‘undefined’ of undefined
    at Object.reportError (xfbml.customerchat.js:65)
    at Object.applyWithGuard (xfbml.customerchat.js:65)
    at l (xfbml.customerchat.js:79)
    at d (xfbml.customerchat.js:83)
    xfbml.customerchat.js:65 Uncaught TypeError: Cannot read property ‘undefined’ of undefined
    at Object.reportError (xfbml.customerchat.js:65)
    at Object.applyWithGuard (xfbml.customerchat.js:65)
    at l (xfbml.customerchat.js:79)
    at d (xfbml.customerchat.js:83)

    As mentioned at the beginning, I am a complete noob when it comes to coding so please accept my apologies for not fully understanding what are you asking me.

    At some point, I was even thinking about maybe changing it in such a way, that container which holds the ChatBubble would remain hidden (see screenshot):
    https://i.imgur.com/EX1XaUp.png
    and once Chat button would be pressed, the divs style would change but the div on the page does not have any id to which I could reference it to.

    I know that you might be busy, but do you know when the change could have been added for the bubble to remain “hidden” until “Chat” button would be clicked?

    (And I am really sorry for being such a pain… just learned how to changed css (express learning in 3 nights) on some galleries for website to finally look better)

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.