Examples of QRCreation


Examples of com.belerweb.social.weixin.bean.QRCreation

   * @param accessToken access_token是公众号的全局唯一票据
   * @param type 二维码类型,QR_SCENE为临时,QR_LIMIT_SCENE为永久
   * @param sceneId 场景值ID,临时二维码时为32位整型,永久二维码时最大值为1000
   */
  public Result<QRTicket> createQR(String accessToken, QRType type, Integer sceneId) {
    QRCreation request = new QRCreation();
    request.setType(type);
    request.setSceneId(sceneId);
    try {
      String json =
          post("https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=" + accessToken,
              new StringEntity(request.toString()));
      return Result.parse(json, QRTicket.class);
    } catch (UnsupportedEncodingException e) {
      throw new SocialException(e);
    }
  }
View Full Code Here

Examples of com.belerweb.social.weixin.bean.QRCreation

   * @param accessToken access_token是公众号的全局唯一票据
   * @param type 二维码类型,QR_SCENE为临时,QR_LIMIT_SCENE为永久
   * @param sceneId 场景值ID,临时二维码时为32位整型,永久二维码时最大值为1000
   */
  public Result<QRTicket> createQR(String accessToken, QRType type, Integer sceneId) {
    QRCreation request = new QRCreation();
    request.setType(type);
    request.setSceneId(sceneId);
    try {
      String json =
          post("https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=" + accessToken,
              new StringEntity(request.toString()));
      return Result.parse(json, QRTicket.class);
    } catch (UnsupportedEncodingException e) {
      throw new SocialException(e);
    }
  }
View Full Code Here

Examples of com.belerweb.social.weixin.bean.QRCreation

   * @param accessToken access_token是公众号的全局唯一票据
   * @param type 二维码类型,QR_SCENE为临时,QR_LIMIT_SCENE为永久
   * @param sceneId 场景值ID,临时二维码时为32位整型,永久二维码时最大值为1000
   */
  public Result<QRTicket> createQR(String accessToken, QRType type, Integer sceneId) {
    QRCreation request = new QRCreation();
    request.setType(type);
    request.setSceneId(sceneId);
    try {
      String json =
          post("https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=" + accessToken,
              new StringEntity(request.toString()));
      return Result.parse(json, QRTicket.class);
    } catch (UnsupportedEncodingException e) {
      throw new SocialException(e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.