Messenger Extensions对象只有{“AppleMusic”:{}}

时间:2017-11-20 11:16:11

标签: bots facebook-messenger messenger facebook-messenger-bot

我正在尝试制作一个信使机器人和聊天扩展程序。

  1. 我设置了home_url
  2. 将网址列入白名单
  3. 正确加载SDK
  4. window.extAsyncInit
  5. 内做所有事情
  6. 我正在做的所有测试都在移动设备中的信使应用程序中。
  7. 但是当我通常在聊天线程中打开聊天扩展并尝试使用时,

    getContext() or any other method
    

    什么都没发生。

    <script type="text/javascript">
            window.extAsyncInit = function () {
                 MessengerExtensions.getContext('I pasted my app id here without quotes',
                   function success(result){
                     alert("Success: "+result.psid);
                   },
                   function error(result){
                     alert(JSON.stringify(result));
                   }
                 );
             };
      </script>
    

    当我尝试这样做时,

    alert(JSON.stringify(MessengerExtensions))
    

    显示

    {"AppleMusic":{}}
    

    我错过了什么?

0 个答案:

没有答案