Name Last Update
dist/yoho-share Loading commit data...
examples Loading commit data...
spm_modules Loading commit data...
tests Loading commit data...
HISTORY.md Loading commit data...
README.md Loading commit data...
index.js Loading commit data...
package.json Loading commit data...

yoho-share spm version


yoho-share plugin

Install

$ spm install yoho-share --save

Usage

var yohoShare = require('yoho-share');
yohoShare.init({
    //配置参数
});
// use yohoShare

##参数说明

    var defaults={
            width:800,              //弹出框的默认宽度
            height:500,             //弹出框的默认高度
            img:"",                 //分享出去的图片地址
            imgFunction:null,       //该函数返回值为分享图片的地址
            sinaText:"",            //新浪分享文本
            sinaTextFunction:null,  //函数返回新浪分享文本
            tweetText:"",           //推特分享文本
            tweetTextFunction:null, //函数返回推特分享文本
            fbCaption:"",           //facebook分享标题
            fbDescription:"",       //facebook分享文章描述
            fbName:"",              //facebook分享文章名称
            fbTextFunction:null,    //facebook函数返回
            shareUrl:"",            //facebook函数返回
            shareUrlFunction:null,  //facebook函数返回
            fbAppId:"",             //链接facebook使用的appid
            fbUrl:"",               //facebook分享的url,该参数提供后无法分享图片即img参数无效
            qqText:""               //qq空间分享
        }