App调用手机系统分享窗口
系统分享非官方提供接口,不用申请权限,同样也没有回调。
苹果纯文本分享(SystemShareTxt)只支持填写网址链接,不支持纯文本。
文本分享
BSL.SystemShareTxt(‘content’)
| 参数 | 必填 | 说明 |
|---|---|---|
| content | 是 | 分享的文本内容 |
<a href="#" onclick="BSL.SystemShareTxt('系统分享测试')">纯文本分享</a>图片分享
BSL.SystemShareImg('image')
| 参数 | 必填 | 说明 |
|---|---|---|
| image | 是 | 分享的图片链接 |
<a href="#" onclick="BSL.SystemShareImg('http://open-qiniu.appbsl.com/sources/94830/329681/qr_test.png')">单图分享</a>多图片分享
BSL.SystemShareImgs('images')
| 参数 | 必填 | 说明 |
|---|---|---|
| images | 是 | 分享的图片链接字符串数组 |
<script>
function SharedImg(){
var data = ["http://www.appbsl.cn/demo/img/share1.png",
"http://www.appbsl.cn/demo/img/share2.png",
"http://www.appbsl.cn/demo/img/share3.png",
"http://www.appbsl.cn/demo/img/share4.png"];
BSL.SystemShareImgs(data);
}</script><a href="#" onclick="SharedImg()">多图分享</a>