Este documento foi atualizado.
A tradução para Português (Brasil) não foi concluída ainda.
Atualização em inglês: 13 de jun de 2019
Atualização em Português (Brasil): 20 de abr de 2018

Messenger Extensions JS SDK Reference

The Messenger Extensions SDK gives you the ability to tightly integrate experiences in the webview with the Messenger experience by making added functionality accessible in the webview.

Including the SDK

To make the Messenger Extensions SDK available in the webview, you must whitelist the domains for all sites that will use the SDK, and include the SDK in your site with the following 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 = "https://connect.facebook.net/en_US/messenger.Extensions.js";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'Messenger'));

For complete details, see Add Messenger Extensions SDK.