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 trial

iOS

Accessing twitter usernames iOS

I would like the user to start typing their friends twitter name into a text field and then an option comes up to complete it (like in the twitter app.) Am I allowed to do this by twitter and if so, how would I go about it?

1 Answer

Most likely you can. Twitter has an official API.

Twitter Developers

Although, you would probably need those twitter accounts pre-indexed somehow for it to work. That would probably be the easiest way. Have a SQLite database or something containing the names and the links and then perhaps some regular expressions to parse through it. There may be an easier way, too. I don't know.

Thank you!