微信分享的各种大小限制

 微信分享的图片,文字,title,content 各种限制,记录一下:

final boolean checkArgs() {
                if ((getType() == 8)
                                && (((this.thumbData == null) || (this.thumbData.length == 0)))) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, thumbData should not be null when send emoji");
                        return false;
                }
                if ((this.thumbData != null) && (this.thumbData.length > 32768)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, thumbData is invalid");
                        return false;
                }
                if ((this.title != null) && (this.title.length() > 512)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, title is invalid");
                        return false;
                }
                if ((this.description != null) && (this.description.length() > 1024)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, description is invalid");
                        return false;
                }
                if (this.mediaObject == null) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, mediaObject is null");
                        return false;
                }
                if ((this.mediaTagName != null) && (this.mediaTagName.length() > 64)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, mediaTagName is too long");
                        return false;
                }
                if ((this.messageAction != null)
                                && (this.messageAction.length() > 2048)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, messageAction is too long");
                        return false;
                }
                if ((this.messageExt != null) && (this.messageExt.length() > 2048)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, messageExt is too long");
                        return false;
                }
                return this.mediaObject.checkArgs();
        }

欢迎关注我的微信公众号:


猜你喜欢

转载自blog.csdn.net/jinshitou2012/article/details/73527758