Skip to content

Share

This method is a convenient way to share, allowing you to use this interface to share all types of content by simply providing an additional type parameter.

Parameters

PropertyTypeDefault ValueRequiredDescription
typestring-YesShare type: 1 for text, 2 for images, etc. Refer to Share for details
Other ParamsParameters required for other share types

Example

javascript
window.Wechat.share({
        type: 1,
        text: '分享文本',
        scene: 0,
    }, function(res){
        console.log("share success");
    }, function(err) {
        console.error(err);
    }
);

Apache 2.0 License.