Home >Backend Development >PHP Tutorial >javascript - 为何微信JSSDK中添加"查看公众号"按钮无效?

javascript - 为何微信JSSDK中添加"查看公众号"按钮无效?

WBOY
WBOYOriginal
2016-06-06 20:30:541262browse

调试模式下所有操作都无报错,状态为'ok'
用户通过网页认证snsapi_base方式跳转到页面里
始终无法显示"查看公众号"按钮

显示查看公众号按钮是否还有其他隐形的限制规则?

<code>js</code><code>wx.config({
        debug: true, // 开启调试模式
        appId: '{$appID}',
        timestamp: '{$timestamp}',
        nonceStr: '{$nonceStr}',
        signature: '{$signature}',
        jsApiList: ['hideMenuItems', 'showMenuItems', 'onMenuShareTimeline', 'onMenuShareAppMessage']
    });
</code>
<code>wx.ready(function () {
        wx.showMenuItems({
            menuList: [
                'menuItem:profile', // 添加查看公众号
                'menuItem:addContact'
            ]
        });

    });
</code>

回复内容:

调试模式下所有操作都无报错,状态为'ok'
用户通过网页认证snsapi_base方式跳转到页面里
始终无法显示"查看公众号"按钮

显示查看公众号按钮是否还有其他隐形的限制规则?

<code>js</code><code>wx.config({
        debug: true, // 开启调试模式
        appId: '{$appID}',
        timestamp: '{$timestamp}',
        nonceStr: '{$nonceStr}',
        signature: '{$signature}',
        jsApiList: ['hideMenuItems', 'showMenuItems', 'onMenuShareTimeline', 'onMenuShareAppMessage']
    });
</code>
<code>wx.ready(function () {
        wx.showMenuItems({
            menuList: [
                'menuItem:profile', // 添加查看公众号
                'menuItem:addContact'
            ]
        });

    });
</code>

看一下你的公众好是否有权限。

http://github.com/thenbsp/Wechat

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn