Offline Programmer
CLOSE SEARCH

Share A ScreenShot In Ionic2

Social sharing is a very popular capability that you can add to your app to increase the user engagement and improve your App brand. We’re going to take a look on how you can use Ionic Native to take a screenshot of a screen in your Ionic App and share it using Facebook.

For this you you need the following:

  • Ionic 2 App. Follow ionicframework documentations to start a blank project
  • Social Sharing Plugin – Follow Ionic Native documentations to add it to your App
  • Screenshot Plugin – Follow Ionic Native documentations to add it to your App

 

Let’s add a button to allow the user to share the App screen on Facebook

 

Now let’s add the facebookShare() function where we will capture the screenshot and then share it on Facebook

 

Make sure to get faimiliar with the SocialSharing plugin about sharing on Facebook e.g. you can’t pre-fill the the message. more details here

Happy Sharing 🙂

 

Filed under: AngularJS, ionic, Javascript

  1. gera
    Interesting post, I have some difficulties understanding the URI. you can help me?