Reputation: 33
I am trying to use Facebook Messenger Extensions on my bot
but after I've added attached html & javascript code, I receive error 2071011
(I tried this on Android phone).
<!DOCTYPE HTML>
<head>
</head>
<body>
<script>
(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.com/en_US/messenger.Extensions.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'Messenger'));
window.extAsyncInit = function () {
// the Messenger Extensions JS SDK is done loading
MessengerExtensions.getUserID(function success(uids) {
var psid = uids.psid;
alert(psid);
}, function error(err) {
alert("Messenger Extension Error: " + err);
});
};
</script>
<h2>Test</h2>
</body>
In "messenger.Extensions.js" SDK file I found the following explanation for the error:
"JavaScript bridge does not exist - Please make sure you are in latest version of Facebook or Messenger App."
What does that mean someone can explain what is the problem?
Upvotes: 2
Views: 2864
Reputation: 1309
I had the same problem. I fixed it by:
messenger_extensions: true
Upvotes: 2