Skip to content

Commit 18a017f

Browse files
authored
fix: enable extended tweet mode (#151)
1 parent 0a1302f commit 18a017f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bot.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ const retweet = () => {
1515
const params = {
1616
q: config.query,
1717
result_type: config.result_type,
18-
lang: config.lang
18+
lang: config.lang,
19+
tweet_mode: "extended"
1920
};
2021

2122
TwitterBot.get('search/tweets', params, (err, data) => {
2223
// when no errors
2324
if (!err) {
24-
if (data.statuses[0].text.split('#').length - 1 === 1) {
25+
if (data.statuses[0].full_text.split('#').length - 1 === 1) {
2526
// if there is only one hashtag get the tweet's ID
2627
let retweetID = data.statuses[0].id_str;
2728
console.log(data.statuses[0]);

0 commit comments

Comments
 (0)