github项目地址: https://github.com/JefferyWang/nativeShare.js
使用方法
//引入CSS
<link rel="stylesheet" href="nativeShare.css"/>
//在需要放分享的地方插入以下代码
<div id="nativeShare"></div>
//添加配置,并实例化
<script>
var config = {
url:'http://blog.wangjunfeng.com',// 分享的网页链接
title:'王俊锋的个人博客',// 标题
desc:'王俊锋的个人博客',// 描述
img:'http://www.wangjunfeng.com/img/face.jpg',// 图片
img_title:'王俊锋的个人博客',// 图片标题
from:'王俊锋的博客' // 来源
};
var share_obj = new nativeShare('nativeShare',config);
</script>