Jump to content
McKay Development

Recommended Posts

Posted

Hey there,

 

i am using your steam-community node.js module. I am a trying to post a group comment. Since that function not yet is implemented in steam-community i tried to figure it out myself. On reddit i got this answer:

 

Oops, my bad. I haven't seen this implemented anywhere but here are the details:

URL: POST http://steamcommunity.com/comment/Clan/post/<GROUPID64>/-1/
Data:
comment=<Actual comment text>
count=6
sessionid=<sessionid that matches your cookie>

 

However, i cant fingure out how to implement it. I tried to add this to groups.js:

 

SteamCommunity.prototype.postGroupComment = function(gid, content, callback) {
if(typeof gid === 'string') {
gid = new SteamID(gid);
}
 
var self = this;
this.httpRequestPost({
"uri": "https://steamcommunity.com/comment/Clan/post/"+ gid.getSteamID64() + "/-1/",
"form": {
"sessionID": this.getSessionID(),
"comment": content,
"count": 6
}
}, function(err, response, body) {
if(!callback) {
return;
}
 
callback(err || null);
}, "steamcommunity");
};
 
Calling it like community.postGroupComment("gid", "Test");
 
However, steam just returns success: false.
 
Could you help me or implement group comments in your steam-community?
 
Thank you.
Posted (edited)

Would say that, would say that at all. Just tried to provide as much info as needed/possible. Still thanks for you great work.

 

It is solved anyway, the above code works. The fault was that POST data is case sensitive, so it is sessionid instead of sessionID.

 

You may could add PostGroupComment to your group.js of steam-community.

Edited by iceman20k

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...