Search code examples
node.jstwitter

When I use twitter API such as get() function, It doesn't show all the text. I would like to know how to show all the text to my console


When I use Twitter API such as get() function, I can not find all the text. It shows ..., so I would like to know how to show all the text console.log() Please help me, and thanks for reading.

get() function works. and short messages show. however, Long message doesn't show all. like this :: RT @Cj11197: The Fastest and Most Private coin in Crypto ⭐#APOLLOCURRENCY⭐ Has Released Sharding & is Now in Africa meeting with Local Go…

let T = new Twit({
    consumer_key : '...',
    consumer_secret : '...',
    access_token_key : '...',
    access_token_secret : '...',
    timeout_ms :   60*1000,
    strictSSL : true,
});

T.get('search/tweets', { 
q:  'Banana since:2019-04-18', count: 100}
,async function (err, data, response)
 { ... }
}
//fetch text! 

Above code calls then result :: <part> Has Released Sharding &amp; is Now in Africa meeting with Local Go… RT @coinmarketfeed: Daniel Daianu, from Romanian National Bank @bnr_ro Administration Council, says Cryptocurrencies will never substitute… <part> If result becomes a problem, I would remove it.


Solution

  • You need to add tweet_mode=extended in the payload. Then you will have the full_text. See documentation : https://developer.twitter.com/en/docs/tweets/tweet-updates.html