Jump to content
McKay Development

Recommended Posts

Posted

hi, im getting not logged in error and i could not find why

 

here is my code : 

var SteamUser = require("steam-user");
var client = new SteamUser;
var TradeOfferManager = require('steam-tradeoffer-manager');
var manager = new TradeOfferManager({
    steam:        client,
    domain:       "localhost",
    language:     "en",
    pollInterval: 10000,
    cancelTime:   300000
});
client.logOn({
  "accountName":"steamid",
  "password":"steampw",
});
client.on('loggedOn', function(details){
  console.log("["+client.steamID.getSteam3RenderedID()+"]Logged on");
client.setPersona(SteamUser.EPersonaState.Online);
  client.gamesPlayed(440);
});
client.on('error',function(e){console.log(e)});
client.on('webSession',function(sessionID,cookies){console.log("++WebSession++")});
client.on('newItems',function(count){console.console.log(count+" yeni eÅŸya.");})
client.on('accountLimitations', function(limited, communityBanned, locked, canInviteFriends) {
	var limitations = [];

	if(limited) {
		limitations.push('LIMITED');
	}

	if(communityBanned) {
		limitations.push('COMMUNITY BANNED');
	}

	if(locked) {
		limitations.push('LOCKED');
	}

	if(limitations.length === 0) {
		console.log("Our account has no limitations.");
	} else {
		console.log("Our account is " + limitations.join(', ') + ".");
	}

	if(canInviteFriends) {
		console.log("Our account can invite friends.");
	}
});
var offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=11111&token=22222")
offer.addMyItems([
	{
		"appid": 730,
		"contextid": 2,
		"assetid": "7883664867"
	}
]);

offer.addTheirItems([
	{
		"appid": 730,
		"contextid": 2,
		"assetid": "7679971620"
	}
]);

offer.send(function(err, status) {
	if (err) {
		throw err;
	}

	console.log("Offer #" + offer.id + " is now " + status);
});

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