Reputation: 131
I am currently working on facebook bot. I am trying to integrate facebook "Send to Messenger" plugin on my website. The bot is reviewed and live currently, yet I can't see the send to messenger button. May be I am missing something. Any suggestions will be appreciated. Thank you in advance.
<html>
<head>
</head>
<body>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'AppId',
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-send-to-messenger" messenger_app_id="AppId" page_id="pageId" data-ref="PASS_THROUGH_PARAM" color="blue" size="standard"></div>
</body>
</html>
Upvotes: 0
Views: 3231
Reputation: 22926
Your Page ID should be your page's Numeric ID, not the one in your URL (facebook.com/pagename). Get the numeric ID from here - http://findmyfbid.com/
Upvotes: 0
Reputation: 131
Thank you EMD, Ashish Virmani and Morales Batovski for your valuable time and comment. The problem was, the button don't work at offline, it need online environment like we have to deploy it live then only it will appear on your page.
Upvotes: 3
Reputation: 21
Do you have third party cookies disabled? The plugin requires them to be enabled. In Google Chrome, go to:
Settings > Advanced > Content Settings
Uncheck:
Block third party cookies and site data.
Upvotes: 2
Reputation: 201
Make sure your page_id is the actual page_id. It's different from the messenger_app_id.
Upvotes: 1