Reputation: 23
I want to know if there is a possibility to integrate facebook messenger into my web site ? I mean I have an admin interface and there should be a chat with the messages I receive on my facebook page and from there to respond them without having to go to the facebook page. I read the new thing that facebook has on the developers page but there they only have the bot messenger not live one.
Thanks !
Upvotes: 0
Views: 2787
Reputation: 109
It is possible to have a chatbox window on your website that will send messages to your bot.
I tried this tutorial that worked fine for me (never managed to test it offline for some reason). Please also note that it will properly work for everyone once your bot will be approved.
http://www.labnol.org/internet/embed-facebook-messenger-website/29136/
Here's the code that I tried from the section C of the link (replace the id with your app id)
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '95100348886',
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>
<div class="fb-page"
data-href="https://www.facebook.com/XZY/"
data-tabs="messages"
data-width="400"
data-height="300"
data-small-header="true">
<div class="fb-xfbml-parse-ignore">
<blockquote></blockquote>
</div>
</div>
Upvotes: 1