zoukankan      html  css  js  c++  java
  • 抖音api接口调用-关注与取消关注抖音号

    抖音sdk接口API调用-关注与取消关注抖音号

    /**
     * @author wechat:happybabby110
     * @blog http://www.wlkankan.cn
     * 关注抖音号
     */
    @Async
    public  void handleMsg(ChannelHandlerContext ctx,TransportMessage vo, String contentJsonStr) {
        try {
            log.debug(contentJsonStr);
            FollowTaskMessage.Builder bd = FollowTaskMessage.newBuilder();
            JsonFormat.parser().merge(contentJsonStr, bd);
            FollowTaskMessage req = bd.build();
            //将消息转发送给手机客户端
            asyncTaskService.msgSend2Phone(ctx, req.getImUid(), EnumMsgType.FollowTask, vo, req);
        } catch (Exception e) {
            e.printStackTrace();
            MessageUtil.sendJsonErrMsg(ctx, EnumErrorCode.InvalidParam, Constant.ERROR_MSG_DECODFAIL);
        }
    }
    
    /**
     * 取消关注抖音号
     * @author wechat:happybabby110
     * @blog http://www.wlkankan.cn
     */
    @Async
    public  void handleMsg(ChannelHandlerContext ctx,TransportMessage vo, String contentJsonStr) {
        try {
            log.debug(contentJsonStr);
            UnFollowTaskMessage.Builder bd = UnFollowTaskMessage.newBuilder();
            JsonFormat.parser().merge(contentJsonStr, bd);
            UnFollowTaskMessage req = bd.build();
            //将消息转发送给手机客户端
            asyncTaskService.msgSend2Phone(ctx, req.getImUid(), EnumMsgType.UnFollowTask, vo, req);
        } catch (Exception e) {
            e.printStackTrace();
            MessageUtil.sendJsonErrMsg(ctx, EnumErrorCode.InvalidParam, Constant.ERROR_MSG_DECODFAIL);
        }
    }
  • 相关阅读:
    SQL Server profile使用技巧
    Java 十进制和十六制之间的转化(负数的处理)
    Step By Step(Lua调用C函数)
    Python、Lua和Ruby之优劣
    C++注释规范
    树莓派、 Arduino 、传统单片机开发板该如何选择?
    正则表达式
    python 读写文件
    python连接Oracle数据库
    MySQL获取Schema表名和字段信息
  • 原文地址:https://www.cnblogs.com/wuliaokankan/p/14137205.html
Copyright © 2011-2022 走看看