Skip to content

public WxMenu menuTryMatch(String userid) throws WxErrorException接口错误 #128

Closed

Description

@javafree

接口应该是post调用
https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1455782296&token=&lang=zh_CN
测试个性化菜单匹配结果

http请求方式:POST(请使用https协议)

https://api.weixin.qq.com/cgi-bin/menu/trymatch?access_token=ACCESS_TOKEN

请求示例

{
"user_id":"weixin"
}

user_id可以是粉丝的OpenID,也可以是粉丝的微信号。

public WxMenu menuTryMatch(String userid) throws WxErrorException {
    String url = "https://api.weixin.qq.com/cgi-bin/menu/trymatch";
    try {
        String e = this.wxMpService.get(url, "user_id=" + userid);
        return WxMenu.fromJson(e);
    } catch (WxErrorException var4) {
        if(var4.getError().getErrorCode() != '뎳' && var4.getError().getErrorCode() != '뎲') {
            throw var4;
        } else {
            return null;
        }
    }
}

Activity

  1. binarywang commented on Jan 17, 2017

    @binarywang
    Owner

    重复了 #125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions