/nodejs-twitter

Twitter integration using Nodejs

Primary LanguageJavaScript

Certainly! Here's a basic README for your package that includes just the code file you provided:

Twitter OAuth Tweet Sender

This Node.js package provides a simple command-line tool for sending tweets to Twitter using OAuth 1.0a authentication. It uses the oauth-1.0a library for OAuth authorization and the crypto library for cryptographic functions.

Installation

  1. Clone the repository or download the code file.

  2. Install the required Node.js modules:

    npm install
  3. Set up your Twitter API credentials by creating a .env file in the project directory and adding the following information:

    CONSUMER_KEY=your_consumer_key
    CONSUMER_SECRET=your_consumer_secret
    

    Replace your_consumer_key and your_consumer_secret with your actual Twitter API credentials.

Usage

To use this tool, follow these steps:

  1. Run the application:

    node index.js
  2. The application will guide you through the OAuth authentication process, including authorizing the application and entering a PIN provided by Twitter.

  3. Once authenticated, you can enter the text of your tweet, and the application will send the tweet to your Twitter account.

License

This package is open-source software licensed under the MIT License.