Closed viglioni closed 5 years ago
I ran into something similar, where the user IDs were getting mangled in the requests when they were sent as ints/numbers: https://stackoverflow.com/questions/47188449/json-max-int-number/47188576.
You can see the similar issue in your error logs, where two zeroes 00
are being appended to your IDs.
~The solution was to turn the IDs into strings when sending the requests (String(friend_id)
or ''+friend_id
), probably when you store them from the friends/ids
call so you're always working with IDs as strings in your code.~ (See reply below for better way using stringify_ids
when fetching from friends/ids
)
Actually, you can just request that all IDs are stringified when you request them like so:
twit.get('friends/ids', {
stringify_ids: true
})
twit.get('friends/ids', {
stringify_ids: true
})
This worked just fine!!! Thank you!
I am closing this issue :)
Hello
I am trying to unfollow accounts given their id.
First step i get all the people that I follow:
where T is my Twit object. And this part works perfectly.
Then I try to unfollow some of these ids using this method, after the resolution of the promise, of course:
The strangest part is: it worked for some of the id's that i have tried and did not for others. This is the error message i get:
The full error message is:
Thanks in advance!