track.scrobble issue in Android

 
  • track.scrobble issue in Android

    iam writing code for last.fm in android.
    As i was trying to scrobble using url =
    http://ws.audioscrobbler.com/2.0/?method=track.scrobble&timestamp=1328162314&api_key=xxxxxxx&api_sig=xxxxxxx&sk=xxxxxxxx&album=xxxxxx&track=xxxxx&artist=xxxxxxx
    it gives me response code as : 403.
    OR
    <?xml version="1.0" encoding="utf-8"?>
    <lfm status="failed">
    <error code="3">Invalid Method - No method with that name in this package</error></lfm>
    as i have used request type as post, but then also it is not giving me proper response.
    pls give me suggestion to solve this problem that iam facing in android.

    -------------------------
    i have also made post request to the root url using Rest Client addon of Firefox browser.
    eg: http://ws.audioscrobbler.com/2.0/
    With all parameters (including the 'method') sent in the POST body.
    eg:?method=track.scrobble&timestamp=1328186610&api_key=xxxxxxxx&api_sig=31005047a68cd77fc25d7cf0654962f9&sk=xxxxxx
    &album=Recovery&track=NotAfraid&artist=Eminem

    then also iam geting response as:
    <error code="3">Invalid Method - No method with that name in this package</error>

    here authtoken and api_signature is calculated as :
    authToken = MD5.getHashString("xxxxxxx" + MD5.getHashString("xxxxxxxx"));
    api_sig = MD5.getHashString("album"+album+"api_key"+api_key+
    "artist"+artist+
    "authToken"+authToken+"methodtrack.scrobble"+
    "sk"+sk+
    "timestamp"+timestamp+
    "track"+track+
    secret);

  • I got the solution.

Anonyma användare kan inte skriva inlägg. Vänligen logga in eller skapa ett konto för att göra inlägg i forumen.