Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: How to wait for limits in GetUsersFromId

$
0
0
Hi,

I use
 IEnumerable<long> BloccoIE = UtentiId as IEnumerable<long>;
 IEnumerable<IUser> BloccoUtenti = Tweetinvi.User.GetUsersFromIds(BloccoIE);
and it works, I can query multiple times 100 ids each time and then save the results.

The problem is that after a while (I suppose when I reach the limit) I get an exception on this code that is before my query
TwitterCredentials.ExecuteOperationWithCredentials(cred, () =>
{
   var user = User.GetLoggedUser(cred);
(user is null)


the overall structure of my code is
while true
    Get 100 ids from my db
    ExecuteOperationWithCredentials
        GetUsersFromId
        save users on db
loop

Maybe I must insert an await

Viewing all articles
Browse latest Browse all 4126

Trending Articles