Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDK Chavez
8,260 PointsTreehouseBlogPost API Challenge
In the TreehouseBlogPostAPI there is a JSONArray post and there is a URL key and its value is a URL How to get the value? The method getString() wont work. Please help guys. Im trying to do the TreehouseBlogPost API Challenge. Thank you in advance.
2 Answers
Seth Kroger
56,413 PointsFrom what I see of the API response from http://blog.teamtreehouse.com/api/get_recent_summary/ getString() should be correct for pulling the url from the individual posts. Perhaps you can share the code you have and give a little more detail by what "doesn't work" means? (Does getString() it throw an exception? Give you a bad/wrong string?)
DK Chavez
8,260 PointsIt worked now sir thank you so much getString() works but my TextView is the same color of my relative layout background.that's why i cannot see the URL. So i change the textColorLink property to something visible. Thank u so much for the guidance.