subhog/meteor-twit — pull request #3 by TimBroddin (2014-05-12 19:11:05+00:00)
Title: allow setting consumer key & secret in settings.json

Hi,

I created a small patch that introduces TwitMakerSafe. By using this function you can include your consumer key & secret in settings.json so you can use this in Methods without exposing your application credentials to the client.

Usage is simple, just include this in your settings:

"twit": {
"consumer_key": "XXXXXXX",
"consumer_secret": "XXXXX"
}

And instead of calling:

var Twit = new TwitMaker({ consumer_key: "", consumer_secret: "", access_token: "", access_token_secret: "" });

You can just call:

var Twit = TwitMakerSafe(accessToken, accessTokenSecret);

(wrapped in a Meteor.isServer if)

I hope you'd like to pull this in.