我正在尝试制作一个信使机器人和聊天扩展程序。
window.extAsyncInit
但是当我通常在聊天线程中打开聊天扩展并尝试使用时,
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":{}}
我错过了什么?