lastfm api
Übersicht BlitzBasic Allgemein
Dusselchen14Betreff: lastfm api |
Fr, Jul 23, 2010 1:15 Antworten mit Zitat |
|
---|---|---|
Hi,
Ich spiele gerade ein bisschen mit der lastfm api rum. Allerdings hab ich ein Problem: Ich bekomm die Signatur nich generiert. Zitat: 6. Sign your calls
Construct your api method signatures by first ordering all the parameters sent in your call alphabetically by parameter name and concatenating them into one string using a <name><value> scheme. So for a call to auth.getSession you may have: api_keyxxxxxxxxmethodauth.getSessiontokenxxxxxxx Ensure your parameters are utf8 encoded. Now append your secret to this string. Finally, generate an md5 hash of the resulting string. For example, for an account with a secret equal to 'mysecret', your api signature will be: api signature = md5("api_keyxxxxxxxxmethodauth.getSessiontokenxxxxxxxmysecret") Where md5() is an md5 hashing operation and its argument is the string to be hashed. The hashing operation should return a 32-character hexadecimal md5 hash. wenn ich das nun aber mache, gibt lastfm nur Zitat: 13 : Invalid method signature supplied zurück.
Ich glaube einfach, dass ich mit dem "api_keyxxxxxxxxmethodauth.getSessiontokenxxxxxxxmysecret" string was falsch mache. Bei mir im Code sieht er so aus: Code: [AUSKLAPPEN] app_api_key$+"methodauth.getsession"+token$+app_api_secret$
Müsste das nicht eigentlich richtig sein? die Variablen haben alle die richtigen Werte. |
||
Vertex |
Fr, Jul 23, 2010 1:31 Antworten mit Zitat |
|
---|---|---|
Weiß nicht, ob dass das gleiche ist, aber schau mal hier:
http://developer.yahoo.com/jav...rAuth.html So wie es verstanden habe: Code: [AUSKLAPPEN] RawSignature$ = "api_key" + YourAPIKey$ "methodauth.getSessiontoken" + YourSessionToken$ + YourSecret$
Signature$ = MD5$(RawSignature$) Vllt. hast Du nur MD5 übersehen? |
||
vertex.dreamfall.at | GitHub |
Starwar |
Fr, Jul 23, 2010 10:15 Antworten mit Zitat |
|
---|---|---|
Ja, sieht ganz danach aus.
MD5 findest du hier MFG |
||
Dusselchen14 |
Fr, Jul 23, 2010 16:49 Antworten mit Zitat |
|
---|---|---|
nein^^ md5 hab ich daran liegts nicht.
hmm ich bin immernoch der meinung der string ist falsch. aber im lastfm Forum hab ich noch nix brauchbares gefunden -.- @Vertex so geht's auch nicht. |
||
Dusselchen14 |
Sa, Jul 24, 2010 23:26 Antworten mit Zitat |
|
---|---|---|
Ich habs geschafft^^
Das Problem war einfach nur, dass ich: Zitat: app_api_key$+"methodauth.getsession"+token$+app_api_secret$
geschrieben habe und es Zitat: "api_key"+app_api_key$+"methodauth.GetSessiontoken" +token$+app_api_secret$
hätte sein müssen! Problem gelöst! |
||
Übersicht BlitzBasic Allgemein
Powered by phpBB © 2001 - 2006, phpBB Group