English 中文(简体)
twitter api is throwing exception "# is not a valid value for Int32" while getting friends
原标题:

I am using the api twitterizer.framework while getting the friends of a user the api starts throwing this error.

# is not a valid value for Int32. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex
   at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos)
   at System.Convert.ToInt32(String value, Int32 fromBase)
   at System.ComponentModel.Int32Converter.FromString(String value, Int32 radix)
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   --- End of inner exception stack trace ---
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at System.ComponentModel.TypeConverter.ConvertFromString(ITypeDescriptorContext context, CultureInfo culture, String text)
   at System.Drawing.ColorConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at System.ComponentModel.TypeConverter.ConvertFromString(String text)
   at System.Drawing.ColorTranslator.FromHtml(String htmlColor)
   at Twitterizer.Framework.TwitterRequest.ParseUserNode(XmlNode element) in C:Projects	witterizerTwiterizer.FrameworkTwitterRequest.cs:line 514
   at Twitterizer.Framework.TwitterRequest.ParseUsers(XmlElement element) in C:Projects	witterizerTwiterizer.FrameworkTwitterRequest.cs:line 483
   at Twitterizer.Framework.TwitterRequest.ParseResponseData(TwitterRequestData data) in C:Projects	witterizerTwiterizer.FrameworkTwitterRequest.cs:line 305

how to handle this?

最佳回答

This is a known issue, but it will not be corrected. Version 1.* of the Twitterizer library has been abandoned, since BASIC authentication will no longer be supported by Twitter after June (which means the version you have will no longer function).

Please download the beta of Twitterizer 2.

If you would prefer to fix the issue yourself, the problem relates to parsing profile color codes to int values. They should be changed to string values and not parsed.

Ricky (Twitterizer Author)

问题回答

暂无回答




相关问题
C# Networking API s [closed]

Lately I ve been looking for a good networking API i could possibly use and/or reference some of the code within, but i have mere luck searching for some on Google/Bing. Hopefully somebody here has ...

getting XML from other domain using ASP.NET

I m fairly new to ASP.NET. And I was wondering how I could go about getting xml from a site (Kuler s API in this case), and then post the result using AJAX? So what I want here, is to be able to do a ...

Most appropriate API for URL shortening service

I ve just finished an online service for shortening URLs (in php5 with Zend Framework); you can enter an URL and you get an short URL (like tinyurl and such sites). I m thinking about the API for ...

UML Diagram to Model API

I need to create a diagram to document a RESTFul API that build, which UML diagram should I use? Thanks in advance,

How best to expose Rails methods via an API?

Let s say I have a model foo, and my model has a publish! method that changes a few properties on that model and potentially a few others too. Now, the Rails way suggests that I expose my model over ...

简讯

我是否可以使用某些软件来建立简便的航天国家服务器,最好是在 Java? 所有我都希望我的航天国家服务机在任何要求中都用同样的IP地址来回答。

About paypal express checkout api

In this picture,there are 3 main steps:SetExpressCheckout,GetExpressCheckoutDetails and DoExpressCheckoutDetails,I m now sure SetExpressCheckout is to be called by myself,what about ...

热门标签