Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UnknownHostException when accessing api.twitter.com

I'm trying to access this list of public twitts here,
from an android application through a HttpClient:

http://api.twitter.com/1/statuses/public_timeline.json

I keep getting an Exception when connecting:

java.net.UnknownHostException: api.twitter.com

Why is this happening?
How can I fix this?

Thank you

like image 441
Tsimmi Avatar asked Oct 27 '10 16:10

Tsimmi


1 Answers

Make sure you have the INTERNET permission added to your manifest.

<uses-permission
    android:name="android.permission.INTERNET" />
like image 193
Ryan Conrad Avatar answered Sep 19 '22 07:09

Ryan Conrad