Example #1
0
        public void DownloadInitialTweets()
        {
            switch (ColType)
            {
            case ColumnType.Timeline: TwitterTimelineAsync.HomeTimeline(Global.requestToken, null, TimeSpan.FromSeconds(30), ProcessTweetsCallback); break;

            case ColumnType.Mentions: TwitterTimelineAsync.Mentions(Global.requestToken, null, TimeSpan.FromSeconds(30), ProcessTweetsCallback); break;

            case ColumnType.DirectMessages: TwitterDirectMessageAsync.DirectMessages(Global.requestToken, null, TimeSpan.FromSeconds(30), ProcessDMCallback); break; // TODO: Get sent DM's too

            case ColumnType.List:
                string[] astrListParse = ListLocation.Split('/');
                TwitterListAsync.GetStatuses(Global.requestToken, astrListParse[0], astrListParse[1], null, TimeSpan.FromSeconds(30), ProcessTweetsCallback);
                break;
            }
        }
        public static void UserTimeline()
        {
            IAsyncResult asyncResult = TwitterTimelineAsync.UserTimeline(
                Configuration.GetTokens(),
                new UserTimelineOptions(),
                new TimeSpan(0, 2, 0),
                PerformCommonTimelineTests);

            asyncResult.AsyncWaitHandle.WaitOne();

            UserTimelineOptions User_Options = new UserTimelineOptions();

            User_Options.ScreenName = "twitterapi";
            User_Options.Count      = 8;

            TwitterResponse <TwitterStatusCollection> timelineResponse = TwitterTimeline.UserTimeline(Configuration.GetTokens(), User_Options);

            PerformCommonTimelineTests(timelineResponse);

            timelineResponse = TwitterTimeline.UserTimeline(User_Options);
            PerformCommonTimelineTests(timelineResponse);
        }