Tuiter is a Node.JS library that makes the interaction with the Twitter API easy.
npm install tuiter
Create a Tuiter object with your Twitter application keys
var keys ="consumer_key" : "blablabla""consumer_secret" : "blablabla""access_token_key" : "blablabla""access_token_secret" : "blablabla";var tu = keys;
Use the api methods as you want, for example:
Using the Streaming is a little different:
It is possible to use lat, long objects for describing location bounding boxes:
Streaming API Calls reconnect automatically but you can finish the connection manually:
API Call responses are Stream objects so you can pipe (for example to a file):
var output = fs;tuiter;
Although you can explicitly reconnect using other params
You can find Projects and demos using Tuiter here
All Search API, REST API V1.1 and Streaming API methods are available. The names of the methods in the library are listed Here
Add your development keys in test/keys.json file like as the follow lines:
var keysjson ="consumer_key" : "6ffkyGE7aWgHyOXVAlzZA""consumer_secret" : "UFiyaFW9RPSacY7547jlIvk9E6Jn07StbgrDkdtKV8""access_token_key" : "308711490-N62VGRYIvNPgBsqDV0nDW491J9q7GJsXqTHm4JpM""access_token_secret" : "QVXnxCI7vO3wtkbxBfMfsDZWHCQX23DipMMTObmak";
Download testing modules dependencies
(The MIT License)
Copyright (c) 2012 Dan Zajdband <email@example.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.