Namespace: Share

Cocoon. Share

Cocoon.Share class provides a multiplatform, easy to use native Share API.


<static> share(callback)

Opens a given share native window to share some specific text content in any system specific social sharing options. For example, Twitter, Facebook, SMS, Mail, ...

Name Type Description
callback function

callback. The callback params called when share completed or dimissed. Params: activity, completed, error

Name Type Description
data object

The data to share

Name Type Description
message string

The message that will be shared.

image string

The image that will be shared. It can be a URL or a base64 image.

                message: "I have scored more points on Flappy Submarine!! Chooo choooo",
                image: ""
            }, function(activity, completed, error){
                    console.log("Share " + completed ? 'Ok' : 'Failed');
Atomic Plugins - JavaScript Documentation by Ludei, DocStrap Copyright © 2012-2013
The contributors to the JSDoc3 and DocStrap projects.