1.0.12 • Published 3 years ago

retweeter v1.0.12

Weekly downloads
24
License
MIT
Repository
github
Last release
3 years ago

Retweeter

Simple bot that retweets and likes recent tweets for a topic if they meet some criteria

Node.js CI Build Status Maintainability Code Coverage Scrutinizer Code Quality Codacy Badge StyleCI

How to use

  • Apply for a Twitter Developer Account to access Twitter APIs

    • Once approved, you will have API_KEY, API_KEY_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
  • Choose the #interesting_topic_to_retweet you want to search the recent tweets for

  • Choose based on what criteria you would like the retweeter to retweet and like (explained the condig in more details later)
  • Instantiate a Bot object and call retweet function as follow:
try {
    console.log('Starting ...');
    const bot = new Bot({
      screenName: 'REPLACE_YOUR_ACCOUNT_SCREEN_NAME',
      apiConfig: {
        consumer_key: YOUR_API_KEY,
        consumer_secret: YOUR_API_KEY_SECRET,
        access_token: YOUR_ACCESS_TOKEN,
        access_token_secret: YOUR_ACCESS_TOKEN_SECRET,
        timeout_ms: 60 * 1000,
        strictSSL: true,
      },
      tweetConfig: {
        minFavs: YOUR_TWEET_MIN_FAVS,
        minFavsToFollowers: YOUR_TWEET_MIN_FAVS_TO_FOLLOWERS_RATIO,
        hashtagsLimit: YOUR_TWEET_MIN_ALLOWED_HASHTAGS,
        wordBlocklist: YOUR_WORD_BLOCKLIST,
        userConfig: {
          minCreationDiff: YOUR_TWEET_USER_MIN_CREATION_DIFF,
          minFollowers: YOUR_TWEET_USER_MIN_FOLLOWERS,
          minTweets: YOUR_TWEET_USER_MIN_TWEETS,
          userBlocklist: YOUR_USER_BLOCKLIST_IDS
        }
      }
    });

    await bot.retweet({
      q: '#interesting_topic_to_retweet',
      count: YOUR_SEARCH_PARAM_COUNT,
      result_type: YOUR_SEARCH_PARAM_RESULT_TYPE,
      lang: 'en',
      // make sure hashtags are included
      include_entities: true
    });
  } catch (error) {
    console.log(error);
  }

Configs

NameDescriptionRequiredType
consumer_keyTwitter API keyYesstring
cconsumer_secretTwitter API key secretYesstring
access_tokenTwitter API access tokenYesstring
access_token_secretTwitter API access token secretYesstring
minFavsTweet minimum number of favorites for retweeting & likingYesnumber
minFavsToFollowersRatio of tweet favorites to the user followers for retweeting & likingYesnumber
hashtagsLimitMaximum number of hashtag that can be in a tweet for retweeting & likingYesnumber
wordBlocklistTweet is ignored if it has any of the blocklisted wordNostring[]
minCreationDiffOnly consider those users who joined tweeter X days agoYesnumber
minFollowersTweet user minimum number of total followers for retweeting & likingYesnumber
minTweetsTweet user minimum number of total tweets for retweeting & likingYesnumber
userBlocklistBlock listed user IDsNostring[]
1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.0

3 years ago