Hi,
I'm working on an Android application for Twitxr,
API methodes like getFriendsTimeline (authentication + GET), works
fine so I guess authentication works fine,
but I got trouble with postUpdate (authentication + POST).
Here's My code :

HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://"; + user_login + ":" +
md5(user_password) + "@twitxr.com/api/rest/postUpdate");

try
{
        // add vars to the request
        List<NameValuePair> nameValuePairs = new
ArrayList<NameValuePair>();
        nameValuePairs.add(new BasicNameValuePair("place", place));
        nameValuePairs.add(new BasicNameValuePair("text", text));
        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
        //
        HttpResponse response = httpclient.execute(httppost);
        ...

}

catch (ClientProtocolException e)
{
        // TODO Auto-generated catch block

}

catch (IOException e)
{
    // TODO Auto-generated catch block

}

This won't work, the API keeps on returning me an error .. What could
be the problem
here?

Thanks a lot.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to