[英]How to show “Login In failed.Please try again” message in angular when Api returns the response?
[英]getting message **sharing failed please try again** in ionic app when I try to share link via whatsapp
說明-: 1.我正在開發離子項目,試圖通過whatsapp共享鏈接
我已經使用shareViaWhatsApp(message, image, url)
函數從https://ionicframework.com/docs/native/social-sharing/
我已經按照所有步驟查看了Ionic提供的文檔
但是問題是-:
當我嘗試通過whatsapp窗口打開共享鏈接但它提示消息共享失敗時,請重試,然后關閉whatsapp窗口, 共享失敗
我把代碼放在下面-
shareViaWhatsapp(){
console.log('invitewhatsapp');
let message = 'Abcd';
//let image = 'sdfgbdh.jpg';
let url = "www.facebook.com";
this.socialShare
.shareViaWhatsApp(message,url,null)
.then(() => {
console.log('success');
})
.catch(() => {
console.log('Error');
});
}
html->
<button ion-fab (click)="shareViaWhatsapp()"><ion-icon name="logo-whatsapp"></ion-icon></button>
第二個參數用於圖像,第三個參數用於URL。 用以下代碼替換您的代碼:
this.socialShare
.shareViaWhatsApp("Abcd",undefined,"www.facebook.com")
.then(() => {
console.log('success');
})
.catch(() => {
console.log('Error');
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.