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

1248 points
E2d32eefd26526d256d23df950771a59?s=140&d=retro
Submitted by
Lu Xie
about 4 years ago

Additional Question of Ex4

In the first step, it said "First, change the id parameter of the request to load the Tweet with ID 266270116780576768." Where can I get the ID?? I think it means userID in twitter, how can I get my twitter ID?


1 vote

permalink

Where to find code featuring usage of the API?

Naturally the only code you will be able to find is open-source code. A good way to find relevant samples is to use a search engine for open-source code, such as Github Search or Koders. Another way to try and identify other project from the library's author, which are likely to use it.

Finally, you could also use sites such as Stackoverflow to ask for a code sample for a specific use-case, e.g. "how do I transmogrify zebras from low-quality to high-quality with the ZebraTransmogrifierHD library?"...

Or you could find existing questions there that ask for how to accomplish things.

What are the disadvantages?

The problem with looking at a code sample, as opposed to finding a tutorial, is that some lines might not be immediately understood by you, and yet you will be eager to try the API so you will reproduce the entire sample in your own code, including these lines.

Having lines in your own code that you do not understand is a very bad idea!

What I do in those cases is to tinker with those mystery lines

  • What happens if I move them around?
  • Remove them altogether?
  • Change the parameters?
  • etc..

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

1 Comment

512d3f8f7df8cbb462001736_165830919 Nicholas Hazel over 3 years ago

On a side note, I've developed 6 instances of wide-run distributions based on guess-and-check and pure logic


0 votes

permalink

You clearly want to expand your answer... can I help by suggesting my other post?

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 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.

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

2 Comments

E2d32eefd26526d256d23df950771a59?s=140&d=retro Lu Xie over 3 years ago

Thanks!!

512d3f8f7df8cbb462001736_165830919 Nicholas Hazel over 3 years ago

yw - View expansion


-1 votes

permalink

It wants you to use the Tweet ID# which is the number provided in the exercise. Each Tweet has a unique identification number.

1275 points
C3d709a8a4e893ec2372d86c580d84d2?s=140&d=retro
Submitted by
Randall McGrew
about 4 years ago