Exemplo n.º 1
0
        public void AddNewFeed(string feed)
        {
            if (feed == "" || feed == null || feed.Length > 66)
            {
                return;
            }

            feed = "https://api.twitter.com/1/statuses/user_timeline.json?screen_name=" + feed + "&count=20";

            //TweetFeedName name = new TweetFeedName(feed);

            if (!ContainsTwitter(feed))
            {
                twitterFeeds.Add(new TweetFeedName(feed));
                AppSettingsData.AddTwitterChannel(feed);
            }

            //if (!twitterFeeds.Contains(name))
            //{

            //}
        }
Exemplo n.º 2
0
        public static async void GetNewTweets()
        {
            try
            {
                viewModel.UpdateTweetListWithoutRefresh =
                    await FeedFetch.GetTweetsAsync(AppSettingsData.TweetsToLoad);

                AppSettingsData.NewTweetsLoaded = true;
            }
            catch (Exception)
            {
                string[] saveOldTwitters = new string[AppSettingsData.TweetsToLoad.Length - 1];
                for (int i = 0; i < saveOldTwitters.Length; i++)
                {
                    saveOldTwitters[i] = AppSettingsData.TweetsToLoad[i];
                }
                AppSettingsData.SaveTweets(saveOldTwitters);
            }
            //await frame.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
            //    async () =>
            //    {

            //    });
        }