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
npm install twt-api
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);
})();
Use This Package to Get oauth and oauth_secret Twitter Token : znmn/xauth-login
- 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);
☑ INSTAGRAM : https://instagram.com/xznmnx
☑ FACEBOOK : https://www.facebook.com/mr.znmn
☑ Github : https://www.github.com/znmn