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

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

WBOY
Release: 2016-06-06 20:30:54
Original
1266 people have browsed it

调试模式下所有操作都无报错,状态为'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>
Copy after login
Copy after login
<code>wx.ready(function () {
        wx.showMenuItems({
            menuList: [
                'menuItem:profile', // 添加查看公众号
                'menuItem:addContact'
            ]
        });

    });
</code>
Copy after login
Copy after login

回复内容:

调试模式下所有操作都无报错,状态为'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>
Copy after login
Copy after login
<code>wx.ready(function () {
        wx.showMenuItems({
            menuList: [
                'menuItem:profile', // 添加查看公众号
                'menuItem:addContact'
            ]
        });

    });
</code>
Copy after login
Copy after login

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

http://github.com/thenbsp/Wechat

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template