zoukankan      html  css  js  c++  java
  • 微信获取二维码

    微信获取二维码

    String listUrl = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token="+accessToken;
            // {"action_name": "QR_LIMIT_STR_SCENE", "action_info": {"scene": {"scene_str": "123"}}}
            Map<String, Object> request = new HashMap<String, Object>();
            request.put("action_name", "QR_LIMIT_STR_SCENE");
            Map<String, Object> actionInfoMap = new HashMap<String, Object>();
            Map<String, String> sceneMap = new HashMap<String, String>();
            sceneMap.put("scene_str", qrid);
            actionInfoMap.put("scene", sceneMap);
            request.put("action_info", actionInfoMap);
            @SuppressWarnings("unchecked")
            Map<String,String> postMap = template.postForObject(listUrl, request, Map.class);
            if(postMap == null){
                return "";
            }
            String url = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=";
            return url + postMap.get("ticket");
  • 相关阅读:
    win10远程桌面连接提示身份验证错误,要求的函数不受支持的解决方案
    十六进制转八进制
    十六进制转十进制
    十进制转十六进制
    LEETCODE
    LINUX
    LINUX
    LEETCODE
    LEETCODE
    LEETCODE
  • 原文地址:https://www.cnblogs.com/stono/p/6597504.html
Copyright © 2011-2022 走看看