You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const SteamUser = require('steam-user'),
Community = require('steamcommunity'),
MyUser = SteamUser(logInfo),
MyCommunity = new Community()
MyUser.on('webSession', (sessionID, cookies) => {
MyCommunity.setCookies(cookies)
})
SomeObject.on('request',function(){
MyCommunity.request("https://steamcommunity.com/my/badges/", function (err, response, body){
console.log(body) //there are my badges, when I request it for first time (after login)
})
})
But after couple of hours, when I request again, it returns a page there are no badges. I think something wrong with setCookie method, probably it sets cookies incorrectly, I don't know why.
Also I tried update cookies with: MyCommunity.on('sessionExpired', (err) => { MyUser.webLogOn() })
or setTimeout(()=>{ MyUser.webLogOn() }, coupleHours)
But got same the page with no badges.
Try calling webLogOn, and listen to MyUser.once('webSession') to set cookies, before making a steamcommunity request
I do so but in this example I simplified the real code. As I said in first post it works for couple of hours, but after couple of hours it returns a page there are no badges
Hello,
I request my badges with:
But after couple of hours, when I request again, it returns a page there are no badges. I think something wrong with setCookie method, probably it sets cookies incorrectly, I don't know why.
Also I tried update cookies with:
MyCommunity.on('sessionExpired', (err) => { MyUser.webLogOn() })
or
setTimeout(()=>{ MyUser.webLogOn() }, coupleHours)
But got same the page with no badges.
[email protected]
The text was updated successfully, but these errors were encountered: