This forum is now read-only. Please use our new forums at

Introduction to Twitter's API Forum

View Course » View Exercise

254 points
Submitted by
Greg Ayling
almost 5 years ago

edit: Looking for name, not username.

The instruction box contains the following.
'print that Tweet on a single line in the following format "USERNAME - TWEET_TEXT"'

It looks like the question is looking for the format "SCREEN_NAME - TWEET_TEXT". Maybe the text should be changed to avoid confusion.

EDIT: I guess I meant "NAME - TWEET_TEXT"

1 vote


It isn't asking for either, it is actually asking for "name" which it only says in the hint.

882 points
Submitted by
Jason Mavandi
almost 5 years ago

1 vote


First and foremost...

  • These API lessons are teaching concepts that are constantly evolving. Each of these API courses involve a 3rd party API that can change on a moments notice (can you say FB?)
  • The name attribute is how the XML/JSON is formed. You will always be forced (without additional coding) to utilize the API's features and implementation.
  • The requirements are outlined in the source code mixed with instructions, but digging through it is a pain. I consider myself an intermediate/experienced developer, and I knew what to do, and I still got a tad lost.
  • The course instructions are definitely more geared towards intermediate programmers who know what they're looking for.

I want to help people pass this lesson, because this was written (as well as the other API docs) as a template that isn't relevant or expanding enough information to utilize them externally.

Change your print_tweet function:

# ADD CODE TO PRINT THE TWEET IN "<screen name> - <text>" FORMAT

to show this:

puts tweet["user"]["name"] + " - " + tweet["text"]

If you would like to report a bug or improvement, please utilize the below link. It will get to the codecademy mods as well as the course developer:

I would recommend reading up here: if you want to expand your knowledge.

2126 points
Submitted by
Nicholas Hazel
over 4 years ago