Using the Twitter API
Understanding Twitter Results II

The data we retrieve from Twitter doesn’t include just tweets, it also contains a lot of metadata.

Unfortunately, the metadata contains information that we won’t use (i.e., when the tweet was created, how many people “favorited” it, what hashtags were used, what other Twitter users were mentioned, what language the tweet is in, and the actual text of the tweet).

We’re really only interested in one specific piece of data: the actual text of the tweets.

We can modify our code to print only the text we need, like so:

for status in statuses: print status.text



Modify the for loop to print out only the actual text of the tweet. Use example above to help you.

Folder Icon

Take this course for free

Already have an account?