3

I'd like to retrieve an user's statuses to display them in a listbox (in a webform). Here is my code :

var twitterCtx = new TwitterContext();

var publicTweets =
from tweet in twitterCtx.Status
where tweet.Type == StatusType.User && tweet.ScreenName == txtName.Text
select tweet.Text;

_status = publicTweets.ToList();

But it crashes at the last line with the following message : Input string was not in a correct format.

Why?

How can I do this correctly?

Cordially,

KiTe

Joe Mayo
  • 7,501
  • 7
  • 41
  • 60
Thomas KiTe Trentin
  • 600
  • 1
  • 5
  • 19

1 Answers1

2

I have tried your code and it worked. Try to exactly specify tweet.ScreenName with some constant string:

tweet.ScreenName == "username"

One more variant to try is tweet.ID == "username".