AdvTwitter incorrect follower count?

Hi!

I have noticed that the followers count obtained is different tan the real followers number I can see in Twitter account website or mobile app...

With an account with about 390 followers, I'm getting 224 followers with TAdvTwitter, using your TwitterDemo project. Tried with another account with 66 followers but AdvTwitter just gets 54.

Maybe disabled/inactive follower accounts or something?

Thanks!

Hi,


I have not been able to reproduce this issue.
Is this the case for all accounts or only for specific accounts?
For the accounts I checked, the number of followers retrieved via the API seems to be the same as on the Twitter website.

It might be a temporary API issue which we have no control over.
The documentation doesn't mention any specific information about these numbers:
https://dev.twitter.com/overview/api/users

Hi

I have tried with two different accounts. Both of them return incorrect follower count.

However, I have noticed that...

    AdvTwitter1.Profile.FollowersCount

...is different than...

    AdvTwitter1.Followers.Count

Profile.FollowersCount returns the correct value, but Followers.Count returns a lower value.
If I fill a Listbox with the Followers, just as the TwitterDemo does, it is filled with Followers.Count items, not with Profile.FollowersCount.

This issue has now been fixed.
The update will be available with the next release of the TMS VCL Cloud Pack.

Hi.

Thanks. If it helps, I have been researching and found this:

After using Fiddler to check what's going wrong, here's what I have discovered...

Application send a followers/ids request and I get my followers IDs:

    877083885250727940,1115040936,200259954,369258523,.......

After that, application send a users/lookup for a group of IDs, BUT here is the problem: Some IDs are ignored in the request.

The first one in the example, for example, is not sent in the request. I have checked the TAdvCustomTwitter.GetFollowers code in CloudCustomTwitter.pas and it seems the problem is the "StrToIntT" function, because 877083885250727940 (and many others) is a very long integer, not a simple integer.

If I change StrToIntT to StrToInt64, the Followers list is filled correctly and I get the correct 394 followers.

Then I thing I need to make some changes in GetProfileListInfo function too.

Can you please check it out, please?

Thanks

This is indeed the issue that was found and has now been fixed.

Hi!

Just installed latest release. Although the followers count seems to be correct now, I'm getting blank follower names for a lot of followers, as you can see in the attached screenshot:

The only working method to get the names correctly is getting the profile info for each ID:

  for i := 0 to AdvTwitter1.Followers.Count - 1 do
  begin
      AdvTwitter1.GetProfileInfo(AdvTwitter1.Followers.Items.ID, followerprofile);
      listbox1.Items.add(followerprofile.Name);
  end;

BUT this is extremely slow.

I have added another listbox with the IDs of each follower, if it helps. It seems IDs greater than 2147483647 (max Integer) are ignored.

I suspect you do not use the latest version of the TMS Cloud components as in the latest version the ID property is of type Int64.

Hi

I'm using version 1.4.1.0 as I can see in CloudCustomTwitter.pas

    // v1.4.1.0 : Fixed : Issue with GetFriends and GetFollowers methods

ID property is Int64.

BUT, I think the problema is here:

function TProfileList.Find(const ID: string): TTwitterProfile;
begin
  Result := Find(TCloudBase.StrToIntT(ID));
end;

StrToIntT function in CloudBase.pas is using TryStrToInt, which doesn't Support Int64. It should use TryStrToInt64 instead.

In fact, the function StrToInt64T exists, so you only have to update the Find function:

function TProfileList.Find(const ID: string): TTwitterProfile;
begin
  Result := Find(TCloudBase.StrToInt64T(ID));
end;

After this minor change, everything is working perfect. Can you please include this fix in the next release?


Thanks for reporting this oversight. This will be addressed in the next release.