capacitor-socialshare
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i capacitor-socialshare

Weekly Downloads

4

Version

0.0.2

License

MIT

Unpacked Size

1.04 MB

Total Files

240

Last publish

Collaborators

  • rahadur