0

Login Request returning the same URL

hello,
i am writing code in java to try to create a small yahoo messenger
given below is the code i am using. its the same code that is given by yahoo with some modifications.
but when i execute the http get request the server returns the same get URL that was given to it

String url = YahooMessengerConstants.partTokenGetURL + "?" +
"&login="+getUsername()+"&passwd="+getPassword()+
"&oauth_consumer_key="+getConsumerKey();

// Perform the actual call to the server
Log.i("URL",url);

String resultString =
HttpUtils.performHttpGet(url);

// Divide each of the lines into its own string, separating by '\n'
Log.i("Login",resultString);
String[] nameValuePairs = StringUtils.tokenize(resultString, '\n', false);

// The request token is the first line that is returned. At this point,
// quickly remove the first 13 characters: the "RequestToken=" portion of
// the string. We didn't use the StringUtils function because it is too slow
// on a mobile platform for such a large string.
int length=nameValuePairs.length;
for (int i=0;i<length;i++)
{
Log.i("Login",nameValuePairs[i]);
}
String rt = nameValuePairs[0].substring(13, nameValuePairs[0].length());
setRequestToken(rt);
Log.i("Login",getRequestToken());

for example if i send
https://login.yahoo.com/WSLogin/V1/get_auth...mp;login=a& passwd=B&&passwd=walnuttable1&oauth_consumer_key=C;

the result is also
https://login.yahoo.com/WSLogin/V1/get_auth...mp;login=a& passwd=B&&passwd=walnuttable1&oauth_consumer_key=C;

can some one tell whats happenning?

thanks in advance

by
0 Replies

Recent Posts

in Messenger IM SDK