Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backuptweets

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backuptweets

Back up your Twitter tweets with Node.js without oAuth

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

backuptweets - Back up your Twitter tweets with Node.js without oAuth

Sure, the cloud is great, but you can never be sure if Twitter will get bought by the evil empire, is secretly controlled by Ruport Murdoch or might simply have a database crash sometime in the future.

Therefore, with the power of Node.js and this little module you can back up your tweets for safety.

Note that the Twitter API has a maximum of 3.200 tweets to return. So if you're a heavy tweeter you might want to run this module once in a while to make sure no gaps are left in your history.

Usage

Here's the contents of example.js:

var backuptweets = require('./backuptweets.js'),
    fs = require('fs');

backuptweets({
    "user" : "huskyr",
    "debug" : "true"
}, function(tweets) {
    if (tweets) {
        fs.writeFile("tweets.json", tweets.json, function() {
            console.log('json file ready');
        });

        fs.writeFile("tweets.html", tweets.html, function() {
            console.log('html file ready');
        });
    } else {
        console.log("error");
    }
});

API

backuptweets(arguments, callback);

'arguments' should be an object with the following properties:

  "user" - Your Twitter user name. Required.
  "debug" - Returns lots of debug information in node's console. Defaults to false
  "max" - Maximum number of tweets to fetch. Defaults to Twitter's maximum (3200)

'callback' has one callback argument: an object with three properties:

  "json" - Contains your tweets as a JSON array
  "html" - A simple HTML page with your tweets
  "js" - The original Javascript array

Credits

Copyright 2011 Hay Kranen. Code released under the MIT license (see LICENSE.txt)

  • github
  • website
  • twitter
  • mail

Keywords

FAQs

Package last updated on 19 Jul 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc