在Console App中使用LinqToTwitter并获取AggregateException错误

时间:2016-01-19 08:08:30

标签: linq-to-twitter

我正在尝试对twitter进行基本的SingleUserAuthorizer调用。我在尝试用户Linq请求时收到此异常。有什么想法吗?

  

抛出异常:mscorlib.dll中的'System.AggregateException'

var auth = new SingleUserAuthorizer
{
    CredentialStore = new SingleUserInMemoryCredentialStore
    {
        ConsumerKey = twitterConsumerKey,
        ConsumerSecret = twitterConsumerSecret,
        OAuthToken = twitterAccessTokenSecret,
        AccessToken = twitterAccessToken
    }
};
//await auth.AuthorizeAsync();
var twitterCtx = new TwitterContext(auth);

User user = 
    (from tweet in twitterCtx.User
    where tweet.Type == UserType.Show &&
    tweet.ScreenName == member.screenName
    select tweet)
    .SingleOrDefault();

1 个答案:

答案 0 :(得分:0)

我们通过GitHub的讨论解决了这个问题:

https://github.com/JoeMayo/LinqToTwitter/issues/45