title: How to add Social share to a post Ionic wordpress app
body: <p>I have been trying to insert a share button for a post in my app that is able to use the default apps installed in the android phone and can not seem to find a way through.</p>
  
  <p>This is how my post.ts file looks like</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { NavParams, NavController, AlertController } from 'ionic-angular';
  .
  .
  import { SocialSharing } from '@ionic-native/social-sharing';
  
  
  /**
   * Generated class for the PostPage page.
   */
  
  
  @Component({
    selector: 'page-post',
    templateUrl: 'post.html'
  })
  export class PostPage {
  
    post: any;
    user: string; 
    comments: Array&lt;any&gt; = new Array&lt;any&gt;();
    categories: Array&lt;any&gt; = new Array&lt;any&gt;();
    morePagesAvailable: boolean = true;
  
    constructor(
      public navParams: NavParams,
      public navCtrl: NavController,
      public alertCtrl: AlertController,
      private socialSharing: SocialSharing
    ) {
  
    }
  
    ionViewWillEnter(){
      this.morePagesAvailable = true;
  
      this.post = this.navParams.get('item');
  
      Observable.forkJoin(
        this.getAuthorData(),
        this.getCategories(),
        this.getComments())
        .subscribe(data =&gt; {
          this.user = data[0].name;
          this.categories = data[1];
          this.comments = data[2];
        });
    }
  
    getAuthorData(){
      return this.wordpressService.getAuthor(this.post.author);
    }
  
    getCategories(){
      return this.wordpressService.getPostCategories(this.post);
    }
  
    getComments(){
      return this.wordpressService.getComments(this.post.id);
    }
  
    loadMoreComments(infiniteScroll) {
      let page = (this.comments.length/10) + 1;
      this.wordpressService.getComments(this.post.id, page)
      .subscribe(data =&gt; {
        for(let item of data){
          this.comments.push(item);
        }
        infiniteScroll.complete();
      }, err =&gt; {
        console.log(err);
        this.morePagesAvailable = false;
      })
    }
  
    goToCategoryPosts(categoryId, categoryTitle){
      this.navCtrl.push(HomePage, {
        id: categoryId,
        title: categoryTitle
      })
    }
  
  
  // Social sharing function is here
  
   sharePost() {
  
      this.socialSharing.share("Post Excerpt", "Post Title", "Post Image URL", "Post URL")
      .then(() =&gt; {
        console.log("sharePost: Success");
      }).catch(() =&gt; {
        console.error("sharePost: failed");
      });
  
    }
  
  }
  </code></pre>
  
  <p><strong>Problem</strong>
  How do insert the post title, post url post image (REST API - JSON) into <code>this.socialSharing.share("Post Excerpt", "Post Title", "Post Image URL", "Post URL")</code>
  so that the share button can look more like this</p>
  
  <pre><code>&lt;button ion-fab class="btn share" mini (click)="sharePost()"&gt;&amp;#xF497;&lt;/button&gt;
  </code></pre>
  
  <p><strong>EDIT</strong>
  I have managed to make it work using </p>
  
  <pre><code>sharePost() {
  
      this.socialSharing.share(this.post.excerpt.rendered, this.post.title.rendered, this.post.images.large, this.post.link)
      .then(() =&gt; {
        console.log("sharePost: Success");
      }).catch(() =&gt; {
        console.error("sharePost: failed");
      });
  
    }
  </code></pre>
  
  <p>However when i share like using gmail, the html special characters display</p>
  
  <pre><code>e.g title shows: catering &amp;#038; Cleaning Services 
  Excerpt shows:   &lt;p&gt;Some text[&amp;hellip;]&lt;/p&gt;
  </code></pre>
  
  <p>How do i get rid of those html characters and just show some clean text.?</p>
  
  <p>Thank you </p>