Social Sharing
Share text, files, images, and links via social networks, sms, and email.
For Browser usage check out the Web Share API docs: https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#5-web-share-api
联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.
Ionic 本地分享 Social Sharing插件的安装(Installation)
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
Ionic 本地分享 Social Sharing插件支持的平台(Supported Platforms)
- Android
- Browser
- iOS
- Windows
- Windows Phone
Ionic 本地分享 Social Sharing插件的用法(Usage)
import { SocialSharing } from '@ionic-native/social-sharing/ngx';
constructor(private socialSharing: SocialSharing) { }
...
// Check if sharing via email is supported
this.socialSharing.canShareViaEmail().then(() => {
// Sharing via email is possible
}).catch(() => {
// Sharing via email is not possible
});
// Share via email
this.socialSharing.shareViaEmail('Body', 'Subject', ['[email protected]']).then(() => {
// Success!
}).catch(() => {
// Error!
});