1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | { "name": "ProfileWords", "version": "v0.0.1", "description": "A tool for analyzing Twitter accounts, using follower's bios", "dependencies": { "mongodb": "*", "express": "*", "twit": "~1.1.11", "cookie-parser": "*", "express-session": "~1.0.3", "errorhandler": "*", "morgan": "*", "request":"*", "multiparty":"*", "oauth": "*" }, "engines": { "node": ">=0.10.0" }, "repository": {} } |
1 2 3 4 5 6 7 8 9 10 11 | var consumer = new oauth.OAuth( "https://twitter.com/oauth/request_token", "https://twitter.com/oauth/access_token", process.env.TWITTER_CONSUMER_KEY, process.env.TWITTER_CONSUMER_SECRET, "1.0A", _callBackPage, "HMAC-SHA1"); app.use(errorHandler({ dumpExceptions: true, showStack: true })); app.use(logger()); app.use(cookieParser()); app.use(session({ secret: "very secret" }) ); |
1 | sudo vi /etc/launchd.conf |
1 2 3 | setenv TWITTER_CONSUMER_KEY YOUR-STRING setenv TWITTER_CONSUMER_SECRET YOUR-STRING setenv TWITTER_ENDPOINT YOUR-ENDPOINT |
1 | SET TWITTER_CONSUMER_KEY=YOUR-STRING |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |