This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ③最新のツイートをリツイートする | |
*/ | |
function retweetLatest () { | |
// 最新のツイートのツイートIDを取得する(バージョン25以前) | |
// const accountName = 'belltreeszk' // 対象のアカウントの @~~~~ の部分を記入 | |
// const includeRT = false // RTを含むか(他のユーザーのツイートのRTも再度RTします) | |
// const retweetCount = 5 // 直近何件のツイートをRTするか | |
// const tweetIds = client.pickupTweetsLatest(accountName, includeRT, retweetCount); | |
// 最新のツイートのツイートIDを取得する(バージョン26以降) | |
const accountName = 'belltreeszk' // 対象のアカウントの @~~~~ の部分を記入 | |
const params = { | |
includeRT: false, // RTを含むか(他のユーザーのツイートのRTも再度RTします) | |
includeReply: false, // リプライを含むか | |
includeURL: false, // URLを含むか | |
ignoreWords: ['#駆け出しエンジニアと繋がりたい', '#今日の積み上げ'], // 無視したい単語を入力する。カンマ(,)区切りで複数指定OK。ない場合は [] | |
count: 5, // 直近何件のツイートをRTするか | |
} | |
const tweetIds = client.pickupTweetsLatest(accountName, params); | |
// 受け取ったツイートIDのツイートをすべてリツイートする | |
client.retweet(tweetIds) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment