In Ionic 2, if you want to capture screenshot and send it or share it via Social Network, you can follow these steps below: // First import import { Screenshot } from '@ionic-native/screenshot' ; import { SocialSharing } from '@ionic-native/social-sharing' ; // Second in constructor constructor ( // .... private screenshot : Screenshot , private socialSharing : SocialSharing , //.... ) { } // Now do it // Share Facebook this . screenshot . URI (). then (( res ) => { this . socialSharing . shareViaFacebookWithPasteMessageHint ( body , res . URI , link , bodyHint ). then (() => {}); }); // share via twitter this . screenshot . URI (). then (( res ) => { this . socialSharing . shareViaTwitter ( body , res . URI , link ). then (() => {}); }); // Shar
Comments
Post a Comment