capacitor-socialshare
v0.0.2
Published
This plugins help to Share App in Social
Downloads
8
Readme
Capacitor SocialShare
Capacitor SocialShare is a native ShareActionProvider
& SharingViewController
implementation for IOS & Android. Now you can use this package as a Ionic Capacitor Plugin in your App.
Suported
- [x] Android
- [ ] IOS
- [ ] Electron
Installation
npm install --save capacitor-socialshare
Getting Start
import { Plugins } from '@capacitor/core';
import { ShareOption } from 'capacitor-socialshare'; // Import SocialShare Modules
// Assign Parameters
shareOption: ShareOption = {
subject: 'YOUR SUBJECT',
body: 'YOUR MESSAGE BODY',
url: 'YOUR APP/PLAY STORE URL'
}
// Use Plugin Method
Plugins.SocialShare.share(this.shareOption).then(
(res) => { console.log(res.value) },
(err) => { console.log(err) }
);
Methods
| Name | Parameter | Return | Descrription |
| ------------- | ------------- | ------------- | -------------
| share(option: ShareOption)
| ShareOption | Promise<{value: boolean}>
| It will show Share Intent
in Android & Share Action
in IOS. |
Interfaces
interface ShareOption {
subject?: string;
body?: string;
url?: string;
}
Screenshot
| Android | IOS | | ---------- | ---------- | | Comming soon | Comming soon |
Contributing
- Star this repository
- Open issue for feature requests
Roadmap
License:
Capacitor SocialShare is MIT licensed.