Facebook Checkbox插件已被隐藏

时间:2017-10-27 07:48:34

标签: facebook-javascript-sdk facebook-messenger-bot

我尝试添加复选框插件,但它已被隐藏。 请帮我解决这个问题。

谢谢,

<script>
window.fbAsyncInit = function () {
    FB.init({
        appId: '365440040557177',
        xfbml: true,
        version: 'v2.6'
    });  
    FB.Event.subscribe('messenger_checkbox', function (e) {
        console.log("messenger_checkbox event");
        console.log(e);
        if (e.event == 'rendered') {
            console.log("Plugin was rendered");
        } else if (e.event == 'checkbox') {
            var checkboxState = e.state;
            console.log("Checkbox state: " + checkboxState);
        } else if (e.event == 'not_you') {
            console.log("User clicked 'not you'");
        } else if (e.event == 'hidden') {
            console.log("Plugin was hidden");
        }
    });};
</script>

1 个答案:

答案 0 :(得分:0)

如果allow_login参数设置为false,则需要有一个有效的Facebook用户会话(即不以页面身份登录),否则将隐藏该插件。