Why Social Sharing plugin sends Image but not text on facebook in Ionic 5

742 Views Asked by At

Hello i am trying to use Social Sharing in Ionic 5 to share content from my app to facebook

i installed these

ionic cordova plugin add cordova-plugin-x-socialsharing
npm install @ionic-native/social-sharing

.ts

 ngOnInit() {
   this.url ="www.myproject.com";
   this.imgurl= this.Details.image_path;
   this.message= this.Details.message;
   this.text = this.Details.title;
 }

ShareFacebook(){
this.socialSharing.shareViaFacebookWithPasteMessageHint(this.text, this.imgurl, null /* url */, 'MY project!')
}

.html

 <ion-button color="primary" (click)="ShareFacebook()"><ion-icon name="logo-facebook"></ion-icon></ion-button>

Works it sends the image but it doesn't send the text only image. want to send a variable as text.

any hint?

0

There are 0 best solutions below