How to open the Messenger Customer Chat Plugin from another Facebook button?

Asked

Viewed 277 times

0

I’m implementing the Facebook Chat plugin on a website, where it renders an iframe on the page. I wonder if it is possible to use a button of my page to do the same action of the button that opens the chat in iframe...

inserir a descrição da imagem aqui

I tried to move iframe inside the link but was unsuccessful because the button loses functionality, follow the code I implemented:

//pega o iframe
var getBtChat = $(".fb_dialog.fb_dialog_advanced");

//remove da pagina
$(".fb_dialog.fb_dialog_advanced").remove();

//coloca dentro do link
$("a#btFacebook").append(getBtChat);

All help is welcome...

  • Let me get this straight, the conversation is not being expanded?

  • @Jorge When clicking the facebook button opens the window, I would like to use my button to open the window...facebook renders the default button loose in the page

  • Making the association of the event click to your button $('#botao').click(function(){...}) and play put a $('#seuFrame').show() doesn’t solve it? You have to know how the face button itself is making that call, so just copy it.

  • If the page is hosted and can pass the link, have a look, or if possible, write the code here for testing purposes.

  • Man, some time ago I wanted to do something like this. So I ended up finding a solution that even serves for Whatsapp and is very simple to implement. It might help you: https://lucianobragaweb.github.io/integrar-whatsapp-no-site

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.