Those pits shared by WeChat:
Official ui sharing webpage link ( note the required items: setTitleUrl )
OnekeyShare oks = new OnekeyShare(); //Close sso authorization oks.disableSSOWhenAuthorize(); // title title, used in Evernote, email, information, WeChat, Renren, QQ and QQ space oks.setTitle(reportName); oks.setImageUrl(WebConfig.LOGO_IMAGE_URL); // text is the share text, this field is required for all platforms oks.setText(Name); oks.setTitleUrl(Url); // url is only used in WeChat (including friends and Moments) oks.setUrl(Url); // Start the sharing GUI oks.show(context);
Custom share setShareType: ( note the required items: setShareType )
Wechat.ShareParams sp = new Wechat.ShareParams(); sp.setTitle("Share"); sp.setImagePath(path); //This field must be set. If the audit is bypassed without this field, the sharing can be successful, but if this field is not set after packaging, the sharing will fail sp.setShareType(Platform.SHARE_IMAGE); Platform wechat = ShareSDK.getPlatform(Wechat.NAME); wechat.setPlatformActionListener(newMyPlatformActionListener(mActivity)); // Set the sharing event callback // Execute image and text sharing wechat.share(sp);
Refer to the official documents of sharesdk:
2. Interpretation of the ShareParams field If WeChat bypasses the audit and does not have this field, the sharing can be successful, but if this field is not set after packaging, the sharing will fail