hi there
i want to use this (https://api.twitter.com/1.1/friends/ids.json) but whenever i use it i got like 18 id and i know that the account have more than 100 following so is that because of error in my code or something else ?

1 Like

The default page size is 20 i think, and it’s more of a “limit” so you may get fewer. Set count=5000 to get the max https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friends-ids

1 Like

hi and thanks for responding
i tryed something like this (https://api.twitter.com/1.1/followers/ids.json?cursor=-1&screen_name=targetUser&count=5000)
but give me [{code: 32, message: Could not authenticate you.}] any idea what heppen ?

1 Like

That error occurs when the authentication data is not correct or not present, or when the tool or library you’re using is not able to generate a valid OAuth 1.0a signature. What library or tool are you using to make requests? Also, if that screen_name is public, you can use your Bearer token to authenticate your request in a more straightforward way.

(By the way, you should check out the new Follows lookup endpoints :eyes:)

1 Like

hi there
am using that (GitHub - stefanuros/dartTwitterAPI: A dart class to make accessing the Twitter API from dart and flutter a bit easier.)
i thought is something with the signature but cant find it out .
to make it clear for me should i add the count option to the base url or to the signature parameter or in the both ?

1 Like

In dartTwitterAPI, you can use the options payload to pass query parameters and ensure they are encoded in the OAuth signature:

final _twitterOauth = new twitterApi(
  consumerKey: consumerApiKey,
  consumerSecret: consumerApiSecret,
  token: accessToken,
  tokenSecret: accessTokenSecret
);

Future twitterRequest = _twitterOauth.getTwitterRequest(
  "GET", 
  "followers/ids.json", 
  options: {
    "screen_name": "targetUser",
    "count": "5000",
    "cursor": "-1"
  },
);

var res = await twitterRequest;
print(res.body);
4 Likes

thanks alot

2 Likes