Open zywh opened 8 years ago
Nav bar
<ion-navbar *navbar>
<ion-title>项目详情</ion-title>
<ion-buttons end>
<button (click)="share('Project Title', 'Project Detail', null, 'https://m.maplecity.com.cn')">
<ion-icon isActive="false" name="share" ></ion-icon>
</button>
</ion-buttons>
`</ion-navbar>`
Function
share(message, subject, file, link) {
// this.platform.ready().then(() => {
//window.plugins.socialsharing.share(message, subject, file, link);
SocialSharing.share(message, subject, file, link);
// });
}
https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin
Blog from developer
http://www.x-services.nl/phonegap-share-plugin-facebook-twitter-social-media/754
wechat sharing works fine in IOS but not Android
Cordova socialshare plugin is used. Need emulator to test. It can share either using native sharing window or sharing by app ID like wechat. Need verify
project-details create a sharing button in nav bar