Jump to content
McKay Development

Recommended Posts

Posted

I'm running version 3.9.0 and getting this

{"persona_state":null,"game_played_app_id":null,"game_server_ip":null,"game_server_port":null,"persona_state_flags":null,"online_session_instances":null,"published_instance_id":null,"persona_set_by_user":null,"player_name":"***","query_port":null,"steamid_source":null,"avatar_hash":{"buffer":{"type":"Buffer","data":[8,255,31,18,54,9,225,61,118,6,1,0,16,1,122,6,216,185,217,132,217,138,250,1,20,15,27,33,229,31,235,44,95,199,153,216,246,115,5,181,237,31,150,155,169,232,2,186,251,221,187,5,240,2,255,251,221,187,5]},"offset":25,"markedOffset":-1,"limit":45,"littleEndian":true,"noAssert":false},"last_logoff":"2016-07-02T08:39:22.000Z","last_logon":"2016-07-02T08:40:31.000Z","clan_rank":null,"game_name":null,"gameid":null,"game_data_blob":null,"clan_tag":null,"facebook_name":null,"facebook_id":null}

I don't see the avatar_url_icon unfortunately.

Posted
var buffer = new Buffer([8,255,31,18,54,9,225,61,118,6,1,0,16,1,122,6,216,185,217,132,217,138,250,1,20,15,27,33,229,31,235,44,95,199,153,216,246,115,5,181,237,31,150,155,169,232,2,136,181,219,187,5,240,2,212,188,219,187,5]);

var hash = buffer.toString('hex');
avatar_url_icon = "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/" + hash.substring(0, 2) + "/" + hash;
avatar_url_medium = avatar_url_icon + "_medium.jpg";
avatar_url_full = avatar_url_icon + "_full.jpg";
avatar_url_icon += ".jpg";

console.log(avatar_url_icon);
console.log(avatar_url_medium);

Somehow the url returned is 404, the buffer is the same I posted in the output of getPersonas.

Posted (edited)


client.getPersonas([steamID], function(persona){
//here I get the object persona and use it.
console.log(JSON.stringify(persona));
});

 

Edited by cookie

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...