Created
November 20, 2014 03:57
-
-
Save g33kidd/0047e26c23704341b50b to your computer and use it in GitHub Desktop.
MeteorJS twitter api - https://atmospherejs.com/mrt/twit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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