We use this plugin to give the app the power to share text, files, images, and links via social networks, sms, and email.
To install run:
$ ionic plugin add cordova-plugin-x-socialsharing --save$ npm install --save @ionic-native/social-sharing
This plugin is super easy to use and to install. Learn more in the official documentation.
feed.html<button class="action-button" ion-button clear small (click)="sharePost(post)" icon-left><ion-icon name='share-alt'></ion-icon>Share</button>
feed.tssharePost(post) {//this code is to use the social sharing plugin// message, subject, file, urlSocialSharing.share(post.description, post.title, post.image).then(() => {console.log('Success!');}).catch(() => {console.log('Error');});}