Includes Posted July 13, 2016 Report Share Posted July 13, 2016 (edited) Hello, i wanted add comment on steam profile, what's wrong? var SteamCommunity = require('../index.js'); var ReadLine = require('readline'); var fs = require('fs'); var SteamID = require('steamid'); var CEconItem = require('../classes/CEconItem.js'); var community = new SteamCommunity(); var rl = ReadLine.createInterface({ "input": process.stdin, "output": process.stdout }); rl.question("Username: ", function(accountName) { rl.question("Password: ", function(password) { doLogin(accountName, password); }); }); function doLogin(accountName, password, captcha) { community.login({ "accountName": accountName, "password": password, "captcha": captcha }, function(err, sessionID, cookies) { if(err) { if(err.message == 'CAPTCHA') { console.log(err.captchaurl); rl.question("CAPTCHA: ", function(captchaInput) { doLogin(accountName, password, captchaInput); }); return; } console.log(err); process.exit(); return; } console.log("Logged on!"); SteamCommunity.prototype.postUserComment = function(userID, message, callback) { if(typeof userID === 'string') { userID = new SteamID(userID); } var self = this; this.httpRequestPost({ "uri": "https://steamcommunity.com/comment/Profile/post/76561198015482752", "form": { "comment": message, "count": 6, "sessionid": this.getSessionID() }, "json": true }, function(err, response, body) { if(!callback) { return; } if (err) { callback(err); return; } if(body.success) { callback(null); } else if(body.error) { callback(new Error(body.error)); } else { callback(new Error("Unknown error")); } }, "steamcommunity"); }; }); } Edited July 13, 2016 by Includes Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted July 13, 2016 Report Share Posted July 13, 2016 I... I don't even know what you did here. Did you copy the implementation from the code and paste it? Why?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.