Skip to content Skip to sidebar Skip to footer

Android Twitter User/show (user Information) Migration Version 1 To 1.1

In my Android application, have integrated Twitter. I have changed the user/show api version 1 to version 1.1. The new api is not working and it gives 400 - Bad request exception.

Solution 1:

I have solved my problem by sending authentication with api.

In api version 1.1 we need to send authentication with request otherwise we get 400 bad request(invalid request).

This is the coding example for sending authentication.

private OAuthConsumer consumer;

consumer = newCommonsHttpOAuthConsumer(
Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);

consumer.setTokenWithSecret(token,secret_token);

..........

HttpGet httpGet = new HttpGet(params[0]);
consumer.sign(hpost);

we need sign-core and sign common post jars.

Post a Comment for "Android Twitter User/show (user Information) Migration Version 1 To 1.1"