收藏
回答

小程序服务商组件openAuthorizeAccount is not a function?

MiniprogramThirdpartyPlugin.openAuthorizeAccount({
  platformAppID: 'wxbc9acac3d1086a64', 
  preAuthCode: res.pre_auth_code, //获取的预授权码
  authType: 2, // 仅小程序 
  // bizAppid: wxxxxxxxxx //非必填,用于仅授权指定appid
})

MiniprogramThirdpartyPlugin.openAuthorizeAccount is not a function

回答关注问题邀请回答
收藏

1 个回答

  • 第三方平台小助手
    第三方平台小助手
    06-27

    你好,参考指南自查下https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/operation/thirdparty/beta_mp_plugin.html

    开发使用也可参考此贴排查代码:

    https://developers.weixin.qq.com/community/develop/doc/0000e4b3f58e80f03153d335a6c000

    06-27
    有用
    回复 3
    • v
      v
      06-27
      已经开通了组件,之前调用MiniprogramThirdpartyPlugin.authorize是可以用的,版本号也是大于2.16的,我看插件的文档里面没有写这个openAuthorizeAccount的说明,但是第三方平台文档里有说这个方法
      06-27
      回复
    • v
      v
      06-27回复v
      解决了,文档里插件版本太低,看更新日志,把插件版本改到0.3.x就好了
      06-27
      回复
    • v
      v
      06-27
      如何知道用户操作的结果呢?无论成功失败或者用户关闭都会重定向到之前页面,但是没有任何信息打印
      06-27
      回复
登录 后发表内容