sharesdk WeChat shares those pits shared by qq

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:

1. Customize the sharing ui

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 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326174302&siteId=291194637