Cordova Social Sharing Plugin
Last updated
Last updated
This Cordova plugin is used to share text, files, images, and links via social networks, sms, and email.
Plugin ID/package name: cordova-plugin-x-socialsharing
Tested version: 6.0.4
Plugin ID/package name: cordova-plugin-actionsheet
Tested version: 2.3.3
To check the third party Cordova plugins, you need to create a custom build debugger (Android version or iOS version).
To use the plugin with the android custom build debugger, you need to import the cordova-plugin-androidx-adapter.
Import the Social sharing demo to your Monaca account
From the IDE menu, go to Config → Manage Cordova Plugins .
Click the Import Cordova Plugin button. Then, you can choose to import the plugin using a ZIP file or a URL/package name.
This section describes some of the main functions used in the Demo. For complete API references, please refer to the repository.
Share to Facebook.
A valid authentication on the Facebook app on the device is required in order to use this function.
Parameter
Name | Type | Description |
| String | Message |
| String | Image's source |
| String | website url |
Return Value
Promise
Example
Share to Twitter.
A valid authentication on the Twitter app on the device is required in order to use this function.
Parameter
Name | Type | Description |
| String | Message |
| String | Image's source |
| String | website url |
Return Value
Promise
Example
Share to Instagram.
A valid authentication on the Instagram app on the device is required in order to use this function. This function does not work on iOS.
Parameter
Name | Type | Description |
| String | Message |
| String | Image's source |
Return Value
Promise
Example