Skip to content

znmn/twt-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple Twitter API V1 wrapper for Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published