twt-api

1.1.0 • Public • Published

Twitter V1 API Wrapper

Simple Twitter API V1 wrapper for Node.js

  • Support using "oauth_token" and "oauth_token_secret" from X-Auth Client Twitter Login
  • Using Package : twitter-api-v2

Installation

npm install twt-api

Quick Example

const TwitterAPI = require("twt-api");

(async () {
    const client = new TwitterApi({
        appKey: "CONSUMER_KEY",
        appSecret: "CONSUMER_SECRET",
        accessToken: "oauth_token",
        accessSecret: "oauth_token_secret",
    })

    const me = await client.getMyInfo();
    console.log(me);
})();

How to get oauth and oauth_secret Twitter Token ?

Use This Package to Get oauth and oauth_secret Twitter Token : znmn/xauth-login

Supported Method

  • getMyInfo()

Get Info For Current User

client.getMyInfo();
  • follow()

Follow User By Username/ID User

client.follow(user);
  • unfollow()

Unfollow User By Username/ID User

client.unfollow(user);
  • tweet()

Create a Tweet

client.tweet(text);
  • retweet()

Retweet a Tweet by Tweet ID/Link Tweet

client.retweet(tweet);
  • getUserInfo()

Get Info For Another User By Username/ID User

client.getUserInfo(user);

My Social Media

☑ INSTAGRAM	: https://instagram.com/xznmnx
☑ FACEBOOK	: https://www.facebook.com/mr.znmn
☑ Github	: https://www.github.com/znmn

Package Sidebar

Install

npm i twt-api

Weekly Downloads

13

Version

1.1.0

License

MIT

Unpacked Size

6.5 kB

Total Files

4

Last publish

Collaborators

  • znmn