1.1.1 • Published 10 years ago

such-social-share v1.1.1

Weekly downloads
1
License
ISC
Repository
bitbucket
Last release
10 years ago

Such Social Share

Provide usefull functions for social sharing and mail


Content

Installation

With npm command :

$ npm install such-social-share --save

With require

On your js file :

var Sshare = require('such-social-share')

facebookShare

var Sshare = require('such-social-share');

// Send directly a facebook share
Sshare.facebookShare();

twitterShare

var Sshare = require('such-social-share');
var message = "Share this";

// Send directly a twitter share with message
Sshare.twitterShare(message);

mailTo

var Sshare = require('such-social-share');
var email = "mymail@mysite.com";
var message = "Say my name <br> heisenDoge";
var subject = "Mail from contact";

// Send directly a twitter share with message
Sshare.mailTo(email, subject, message);
  • email : email for the mailto, contact@mysite.com
  • subject : subject for mail
  • message : your message, you can use

mandrillSend

var obj = {
    key : 'YourApiKey',
    from_email : 'sender.mail@mail.com',
    email : 'receiver.mail@mail.com',
    name : 'User Name',
    type : 'to',
    subject : 'hello you',
    content : 'test mail <br> blabla'
};
Sshare.mandrillSend(obj, function(data){
    console.log(data);
});
1.1.1

10 years ago

1.1.0

10 years ago

1.0.5

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.0

10 years ago