A simple share plug-in, share free just by using function command.
This plugin just effect in window (browser)
npm install comshare --save
- With npm
For example you want share this url http://example.com
, and the share title is THIS IS TITLE, content is THIS IS DESCRIPTION, picture path is http://picture.png.
Just use:
const ComShare = require('comshare')
let exampleShare = new ComShare({
url: 'http://example.com',
title: 'THIS IS TITLE',
content: 'THIS IS DESCRIPTION',
pic: 'http://picture.png'
})
// now, you can call the function to share
exampleShare.twitter()
-
.twitter()
twitter -
.facebook()
facebook -
.linkedin()
LinkedIn -
.weixin()
weixin -
.qq()
qq -
.qzone()
qq zone -
.weibo()
weibo -
.tqq()
tqq -
.renren()
renren -
.douban()
douban