Skip to content

Instantly share code, notes, and snippets.

@g33kidd
Created November 20, 2014 03:57
Show Gist options
  • Save g33kidd/0047e26c23704341b50b to your computer and use it in GitHub Desktop.
Save g33kidd/0047e26c23704341b50b to your computer and use it in GitHub Desktop.
MeteorJS twitter api - https://atmospherejs.com/mrt/twit
if(Meteor.isServer()) {
Meteor.methods({
postTweet: function() {
Twitter = new TwitMaker({
consumer_key: Meteor.settings.twitterKey,
consumer_secret: Meteor.settings.twitterSecret,
access_token: Meteor.user().services.twitter.accessToken,
access_token_secret: Meteor.user().services.twitter.accessTokenSecret
});
Twitter.post('statuses/update', {status: "Testing twitter api with #meteorjs"}, function(error) {
if(error)
return console.log(error);
});
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment