/// <summary> /// Retrieve Tweets Trend Topics /// </summary> /// <param name="TwitAuthType"></param> private async void GetTrendTweets(int TwitAuthType) { //Verify if User Authenticated by Twitter AuthenticatedUserStatus = VerifyAuthenticatedUser(); //If User Not already verified by Twitter; Authenticate and Set updated User Auth State if (!AuthenticatedUserStatus) { AuthenticatedUserStatus = await AuthenticateTwitterUser(TwitAuthType); } //Set appropriate Grid - Binding to Visibility to keep all code in ViewModel not the best method, but quick and dirty for UI Test of API Data TweetGridVisible = Windows.UI.Xaml.Visibility.Collapsed; TrendGridVisible = Windows.UI.Xaml.Visibility.Visible; UserGridVisible = Windows.UI.Xaml.Visibility.Collapsed; try { tweetAPI = new TweetAPICall(); GlobalTrendTweets = await tweetAPI.TweetsbyTrend(null); //GridViewTweets = GlobalTrendTweets; //Debug.WriteLine("Trying to get tweets and AuthUser is " + oauthTwitter.AuthenticatedUser); //UserTweets = await tweetAPI.TweetsByUser(UserScreenName); } catch (Exception Ex) { throw new Exception(Ex.Message); } }
/// <summary> /// Retrieve Tweets Trend Topics /// </summary> /// <param name="TwitAuthType"></param> private async void GetTrendTweets(int TwitAuthType) { //Verify if User Authenticated by Twitter AuthenticatedUserStatus = VerifyAuthenticatedUser(); //If User Not already verified by Twitter; Authenticate and Set updated User Auth State if (!AuthenticatedUserStatus) { AuthenticatedUserStatus = await AuthenticateTwitterUser(TwitAuthType); } try { tweetAPI = new TweetAPICall(); GlobalTrendTweets = await tweetAPI.TweetsbyTrend(null); GridViewTweets = GlobalTrendTweets; } catch (Exception Ex) { throw new Exception(Ex.Message); } }