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

191 points
2136132b56ce6f6d9a190e5b90deae72?s=140&d=retro
Submitted by
Jarno Loeff
over 3 years ago

It keeps saying my count is set wrong

http://pastebin.com/2jzZLs7A

I'm a beginner in ruby and it baffles me


8 votes

permalink

I was having the same problem but getting the correct results, right? Try entering your own twitter account.

eg.

query   = URI.encode_www_form(
    "screen_name" => "YOUR USERNAME HERE",
    "count" => 10,
)

Give it a try, worked for me!

322 points
52f41753282ae3a6ee000241_156211101
Submitted by
Zachary
over 3 years ago

4 Comments

5350c3e59c4e9de119000ede_296381803 arquillos over 3 years ago

Good point! It´s working now

Efbab8bf4edfc71a89f59dddeacaa4bf?s=140&d=retro r0ger007 over 3 years ago

oh i think i fixed it.... when you change it from either print tweet["text"] or puts tweet["text"] to p tweet["text"] it arranges the output differently and therefore also the output rows... Now it works. I guess the creator used the p option to check the result. As for your user name -> i think its actually just coincidence that you got the same amount of output lines as the twitterapi via above method at the time ;-)

6030527e818329bed11ac475df65bb4f?s=140&d=retro greghein over 3 years ago

nice work! the p tweet["text"] worked

53ca828d7c82caaea600100e_665449805 Eddie about 3 years ago

p tweet["text"] worked for me as well. This API course is awful!


0 votes

permalink

Same here dude

335 points
Picture
Submitted by
keyur raval
over 3 years ago


0 votes

permalink

Same problem. Annoying

644 points
52c5c95a80ff337902000182_804932809
Submitted by
Gert Jan Wolters
over 3 years ago


0 votes

permalink

Yeah same here!

60 points
Picture
Submitted by
Ritikesh Sisodiya
over 3 years ago

2 Comments

Efbab8bf4edfc71a89f59dddeacaa4bf?s=140&d=retro r0ger007 over 3 years ago

same. :-(

Efbab8bf4edfc71a89f59dddeacaa4bf?s=140&d=retro r0ger007 over 3 years ago

oh i think i fixed it.... when you change it from either print tweet["text"] or puts tweet["text"] to p tweet["text"] it arranges the output differently and therefore also the output rows... Now it works. I guess the creator used the p option to check the result. As for your user name -> i think its actually just coincidence that you got the same amount of output lines as the twitterapi via above method at the time ;-)


0 votes

permalink

As I understand "twitterapi" doesn't have 10 tweets. So, when we set counter to 10, it shows only 7 or 8 tweets, which is not enough to go through validation.
When I have changed "twitterapi" to my own username, I also did not pass :)
I have realized that I got only 5 tweets in my account, so I immediately add 5 more and voila. May be, my experience will help someone.

762 points
533c07d3631fe985c50021cb_305567794
Submitted by
KC
about 3 years ago