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

Introduction to Twitter's API Forum

View Course » View Exercise

254 points
5d2fa2b437fb80fcb37b00614a4b0232?s=140&d=retro
Submitted by
Greg Ayling
about 4 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

permalink

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

882 points
51999618a579244449000f67_898129144
Submitted by
Jason Mavandi
about 4 years ago


1 vote

permalink

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:
http://www.codecademy.com/forms/bugreport

I would recommend reading up here: if you want to expand your knowledge.
http://programmers.stackexchange.com/questions/90531/how-to-learn-an-api

2126 points
512d3f8f7df8cbb462001736_165830919
Submitted by
Nicholas Hazel
over 3 years ago