In my Ionic app, when I try to share any post in FaceBook, share working fine but it getting an only image, no content display in FB share.
How can I fixed it, My FaceBook share code:
facebook_share(){ this.socialSharing.shareViaFacebook(this.message, this.image, this.url).then(() => { }).catch((error) => { this.sysprvd.showAlert('',"not found"); }); }
In ionic you have to pass null as the image parameter because Facebook fetches the image by itself. Apply the below example code hope everything works fine.
facebook_share(){ this.socialSharing.shareViaFacebook("My Text", null, "My URL").then(() => { // Success! }).catch((error) => { this.sysprvd.showAlert('',"Facebook application is not found"); // Error! }); }
Question and answer is powered by AnsPress.io