ttezel / twit

Twitter API Client for node (REST & Streaming API)
4.31k stars 568 forks source link

error Error: Sorry, that page does not exist. for friendships/destroy #449

Closed uxdxdev closed 6 years ago

uxdxdev commented 6 years ago

error Error: Sorry, that page does not exist. for friendships/destroy

T.post(
      'friendships/destroy',
      {
        user_id: userId
      },
      (err, result) => {
        if (err) {
          console.error('error friendships/destroy', err.stack);
        } else if (result) {
          console.log(
            `Successfully unfollowed ${userId}`
          );
        }
      }
    );

Is this a rate limiting issue? I'm unfollowing 1 user per minute, which is 15 per 15 mins. How do i check my limits for this endpoint?

uxdxdev commented 6 years ago

😒 For anyone else getting this error add stringify_ids: true to your request to fetch followers/friends ids as strings.

T.get(
        'followers/ids',
        {
          screen_name: my_user_name,
          cursor: followersCursor,
          stringify_ids: true
        },

Your user_id needs to be string, and not a number for it to work correctly.

     {
        user_id: userId
      },