0 Replies Latest reply: Jul 2, 2011 4:21 AM by 872834 RSS

    yahoo messenger login problem

    872834
      hi,
      i am using yahoo messenger SDK to create a yahoo messenger client for mobile platform. when i try to login using an httpclient it returns the same URL as a result which was posted

      here is the code
      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);
      }
      String rt = nameValuePairs[0].substring(13, nameValuePairs[0].length());
      setRequestToken(rt);
      Log.i("Login",getRequestToken());

      07-02 13:10:00.588: INFO/URL(909): https://login.yahoo.com/WSLogin/V1/get_auth_token?&login=A&passwd=Boauth_consumer_key=dj0yJmk9M1p2TlNTMGRaS0VxJmQ9WVdrOWRGSjFiRXhLTlRJbWNHbzlNakF4T1RZd05qRTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD1hYw--

      the API returns

      https://login.yahoo.com/WSLogin/V1/get_auth_token?&login=A&passwd=Boauth_consumer_key=dj0yJmk9M1p2TlNTMGRaS0VxJmQ9WVdrOWRGSjFiRXhLTlRJbWNHbzlNakF4T1RZd05qRTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD1hYw--

      the same
      can some one help?

      i am stuck here