bonzanini / Book-SocialMediaMiningPython

Companion code for the book "Mastering Social Media Mining with Python"
546 stars 265 forks source link

uncomplete tweet text obtained #17

Open Chealkeo opened 4 years ago

Chealkeo commented 4 years ago

Hi, I wonder why the tweet we obtained using source code in chapter2 is uncomplete, almost 100 characters or so end with the tweet link. Is this the shortcoming by using api? look forward for ur reply, thanks

bonzanini commented 4 years ago

The API has changed since the book was published, in particular Twitter enabled tweets with more characters than before.

The changes are described here: https://developer.twitter.com/en/docs/tweets/tweet-updates

In summary, you may want to look into the fields extended_tweet and full_text. The field text is still there for compatibility but it may be truncated for longer tweets.