Arithmetic operation led to overflow exception on tweetsharp

Hi, I have a problem with tweetsharp sdk. I try to read tweets with the code below, sometimes I don’t always take this exception: "An arithmetic operation led to an overflow." I searched but couldn't find a reason?

TweetSharp.TwitterService tester = new TwitterService();

tester.AuthenticateWith(consumerkey, consumersecret, accesstoken, accesstokensecret);

var a = tester.Search(new SearchOptions { Q = "screenname", Count = 100}); //On this line i take the excepiton
+4
source share
3 answers

As an alternative to creating a source (which can be difficult due to the dependencies of the Windows Phone SDK, etc.), you can try this fork:
https://github.com/timothy-makarov/tweetsharp

This is an unofficial fork bug for TweetSharp wrapped in a NuGet package:
http://www.nuget.org/packages/TweetSharp-Unofficial/

TweetSharp v2.3.0, TweetSharp v2.3.1 JSON. v.2.3.1.2.

+8

. issue github, , . , : , nuget , 22 2013 .

, Nuget, 2.3.1 .

TweetSharp nuget , , .

0

Anyone arriving here with the same issue as user2933990. Below is the correct fix if you added the source code OAuthTwitterWrapper (and compiled) instead of the dll itself.

In the JsonTypes directory, modify the following files:

User.cs

Original

[JsonProperty("id")]
public int Id { get; set; }

Change to

[JsonProperty("id")]
public long Id { get; set; }

Hashtag.cs

Original

[JsonProperty("indices")]
public List<int> Indices { get; set; }

Change to

[JsonProperty("indices")]
public List<long> Indices { get; set; }
0
source

All Articles