本文整理汇总了TypeScript中@ionic-native/social-sharing.SocialSharing类的典型用法代码示例。如果您正苦于以下问题:TypeScript SocialSharing类的具体用法?TypeScript SocialSharing怎么用?TypeScript SocialSharing使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SocialSharing类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: shareInsta
shareInsta() {
this.socialSharing.shareViaInstagram(this.post.post_title, this.post.link_imagem).then(() => {
// Success!
}).catch(() => {
// Error!
});
}
示例2: shareFb
shareFb() {
this.socialSharing.shareViaFacebook(this.post.guid).then(() => {
// Success!
}).catch(() => {
// Error!
});
}
示例3: shareWhatsapp
public shareWhatsapp() {
if (!this.whatsapp) {
this.showError();
return;
}
this.socialSharing.shareViaWhatsApp(this.downloadUrl);
}
示例4: shareWp
shareWp() {
this.socialSharing.shareViaWhatsApp(this.post.guid).then(() => {
// Success!
}).catch(() => {
// Error!
});
}
示例5: shareTt
shareTt() {
this.socialSharing.shareViaTwitter(this.post.guid).then(() => {
// Success!
}).catch(() => {
// Error!
});
}
示例6: ionViewWillEnter
ionViewWillEnter() {
this.socialSharing
.canShareVia('com.apple.social.facebook', 'msg', null, null, null)
.then(() => {
this.shareFacebookVia = 'com.apple.social.facebook';
this.facebook = true;
})
.catch(() => {
this.socialSharing
.canShareVia('com.facebook.katana', 'msg', null, null, null)
.then(() => {
this.shareFacebookVia = 'com.facebook.katana';
this.facebook = true;
})
.catch(e => {
this.logger.error('facebook error: ' + e);
this.facebook = false;
});
});
this.socialSharing
.canShareVia('com.apple.social.twitter', 'msg', null, null, null)
.then(() => {
this.shareTwitterVia = 'com.apple.social.twitter';
this.twitter = true;
})
.catch(() => {
this.socialSharing
.canShareVia('com.twitter.android', 'msg', null, null, null)
.then(() => {
this.shareTwitterVia = 'com.twitter.android';
this.twitter = true;
})
.catch(e => {
this.logger.error('twitter error: ' + e);
this.twitter = false;
});
});
this.socialSharing
.canShareVia('whatsapp', 'msg', null, null, null)
.then(() => {
this.whatsapp = true;
})
.catch(e => {
this.logger.error('whatsapp error: ' + e);
this.whatsapp = false;
});
}
示例7:
}).catch((e) => {
this.socialSharing.canShareVia('com.twitter.android', 'msg', null, null, null).then(() => {
this.shareTwitterVia = 'com.twitter.android';
this.twitter = true;
}).catch((e) => {
this.logger.debug('twitter error: ' + e);
this.twitter = false;
});
});
示例8:
]).subscribe(translations => {
this.socialSharing.shareViaEmail(
translations["SETTINGS.FEEDBACK.EMAIL.FEATURE"],
translations["SETTINGS.FEEDBACK.EMAIL.FEATURE_TITLE"],
["methoappeei@gmail.com"],
[],
[],
null
);
});
示例9: shareItem
shareItem(item) {
const params = {
text: item.hasOwnProperty('description') ? Utils.striptags(Utils.br2nl(item.description)) : null,
title: item.hasOwnProperty('title') ? Utils.striptags(Utils.br2nl(item.title)) : null,
files: [],
url: item.hasOwnProperty('link') ? item.link : null
};
if (item.thumbnails && item.thumbnails.length > 0) {
params.files.push(item.thumbnails[0].url);
}
return this.socialSharing.shareWithOptions(params);
}