Mario Qi
Mario Qi

Reputation: 1

Tweets get back from twitter api are not showing whole tweets

This first I am using python twitter tool. I have question about results get back from it. It seems they are omission of original tweets.

import twitter
api = twitter.Api(consumer_key='jyd2tcu**OHiIrfg',
                  consumer_secret='****t80qZeM4JYvV5V8UpB0fTtebPSsb0LUjI9kYSZbLTRn',
                  access_token_key='1***74372608-dfi5bz22RTKep7GF04lk6FnPSYBgnD',
                  access_token_secret='5gt0YIw***gwPca5RXiwMksg7GM4ACQtl4')

results = api.GetSearch(
raw_query="q=immigration%20&result_type=recent")

Text I got back is

Text='RT @ddale8: Fox is now showing Trump\'s comments at Cabinet. He begins the clip by saying he\'s "heard numbers as high as $275 billion" for h…')

It ends with "…", is it how twitter api works or is there a way i can get whole tweets instead?

thank you

Upvotes: 0

Views: 84

Answers (1)

LeKhan9
LeKhan9

Reputation: 1350

Try passing tweet_mode="extended" to the twitter.Api constructor.

I believe that since the original tweet is greater than 140 chars, we need to inform the interface to expect this as it does not do this by default.

Upvotes: 2

Related Questions