Hey I missing a .dll?

Nov 25, 2014 at 2:48 PM
I trying test out some queries example , but I can't do without this namespace


 var credentials = TwitterCredentials.CreateCredentials(access_Token, access_Token_Secret, consumer_Key, consumer_Secret);
             TwitterCredentials.ExecuteOperationWithCredentials(credentials, () =>
            var followerQuery = String.Format("https://api.twitter.com/1.1/followers/ids.json?user_id={0}", 111111111);
            var returnedIds = TwitterAccessor.ExecuteCursorGETQuery<IIdsCursorQueryResultDTO>(followerQuery, 220000)
                .SelectMany(x => x.Ids);  }
Error 2 The type or namespace name 'QueryDTO' does not exist in the namespace 'Tweetinvi.Core.Interfaces.DTO' (are you missing an assembly reference?)

Error 3 The type or namespace name 'IIdsCursorQueryResultDTO' could not be found (are you missing a using directive or an assembly reference?)
Nov 25, 2014 at 6:14 PM
This namespace is available when you reference the Tweetinvi.Core dll.
In theory you must have this dll referenced to use Tweetinvi as all the other dll references it.

Have you taken the dll's from nuget?

By the way I can see that you are trying to get 220000 followers, please note that you will check your rate limits to get this number of followers.

Nov 25, 2014 at 7:13 PM
ohh, okay thanks, but how can you get all 220000
Nov 26, 2014 at 2:07 PM
You will have to use the RateLimit and check that you have enough rate to access the information.
var followerRateLimits = RateLimit.GetCurrentCredentialsRateLimits().FollowersIdsLimit;
if (followerRateLimits.Remaining > 0)
    // Call method
    // Wait for refreshed rate limit
Nov 26, 2014 at 2:52 PM
I did some research and found about using cursor_id in the url, but how can I get the return cursor_id for getting all followers? I know there there an api limit, but i was wondering how can I get the cursor_id and return to where I was at so I can continue getting followers from where I left.
Nov 26, 2014 at 7:00 PM

Please use the following code :
var results = TwitterAccessor.ExecuteCursorGETCursorQueryResult<IIdsCursorQueryResultDTO>(query, maxNumberOfResults);
var lastCursor = results.Last().NextCursor;
Nov 26, 2014 at 8:27 PM
This works fine, but when I add the cursor_id output to the command, I get an error because it a ulong instead of a long.

var maxObjectsToRetrieve= 200;
var lastCursor = -1

  var followerQuery = String.Format("https://api.twitter.com/1.1/followers/ids.json?user_id={0}&count=100&cursor={1}", userId, cur);

var results = TwitterAccessor.ExecuteCursorGETQuery<IIdsCursorQueryResultDTO>(followerQuery, maxObjectsToRetrieve, lastCursor);
 lastCursor = results.Last().NextCursor;

  var returnedIds = TwitterAccessor.ExecuteCursorGETQuery<IIdsCursorQueryResultDTO>(followerQuery,maxObjectsToRetrieve,  lastCursor).SelectMany(x => x.Ids);
I not sure how to go around this; my cursor idea look like this:

Nov 26, 2014 at 8:46 PM
Edited Nov 26, 2014 at 8:46 PM

Don't specify the cursor yourself, let Tweetinvi manage it for you.
I have changed the query so that the count and cursor information are no longer added to the query. Tweetinvi will add these information for you.
var maxObjectsToRetrieve= 200;
long lastCursor = -1;
var followerQuery = String.Format("https://api.twitter.com/1.1/followers/ids.json?user_id={0}", userId);

var results = TwitterAccessor.ExecuteCursorGETCursorQueryResult<IIdsCursorQueryResultDTO>(followerQuery, maxObjectsToRetrieve, lastCursor);
lastCursor = results.Last().NextCursor;

var returnedIds = TwitterAccessor.ExecuteCursorGETCursorQueryResult<IIdsCursorQueryResultDTO>(followerQuery, maxObjectsToRetrieve, lastCursor).SelectMany(x => x.Ids);
Marked as answer by linvi on 12/2/2014 at 12:02 PM
Nov 28, 2014 at 1:44 PM
Sorry for the late response. By the way it works. Thank you !