// Find the local tweets about the regarding the search private async void SearchTweets() { // prep search if (latitude != 0 || longitude != 0) { geocode = latitude.ToString() + "," + longitude.ToString() + "," + radius.ToString() + "mi"; } searchQuery = NewQuery(); //Debug.Log(searchQuery); //debugText.text = searchQuery; // search SearchResults = await TwitterRestApiHelper.SearchForTweets(searchQuery, this.TwitterApiAccessToken.access_token, language, geocode); if (SearchResults != null) { isTweetFound = true; Debug.Log("Tweets Found"); //PrintTweets(); //debugText.text = "Tweets Found"; tg.GenerateTweets(); } else { Debug.Log("Tweets not Found"); //debugText.text = "Tweets Not Found"; } }
public async void ExampleFunction() { TweetById = await TwitterRestApiHelper.GetTweetByID("1221121465220771840", this.TwitterApiAccessToken.access_token); LatestTweetsFromUserByScreenName = await TwitterRestApiHelper.GetLatestTweetsFromUserByScreenName("Twitter", this.TwitterApiAccessToken.access_token); LatestTweetsFromUserByUserId = await TwitterRestApiHelper.GetLatestTweetsFromUserByUserId("783214", this.TwitterApiAccessToken.access_token); LikedTweetsOfUserByUsername = await TwitterRestApiHelper.GetLikedTweetsOfUserByUsername("Twitter", this.TwitterApiAccessToken.access_token); LikedTweetsOfUserByUserID = await TwitterRestApiHelper.GetLikedTweetsOfUserByUserID("783214", this.TwitterApiAccessToken.access_token); LocalTrends = await TwitterRestApiHelper.GetLocalTrends(1, this.TwitterApiAccessToken.access_token); GlobalTrends = await TwitterRestApiHelper.GetGlobalTrends(this.TwitterApiAccessToken.access_token); GetUserProfileByUserId = await TwitterRestApiHelper.GetUserProfileByUserId("783214", this.TwitterApiAccessToken.access_token); GetUserProfileByUsername = await TwitterRestApiHelper.GetUserProfileByUsername("Twitter", this.TwitterApiAccessToken.access_token); //SearchResults = await TwitterRestApiHelper.SearchForTweets("unity", this.TwitterApiAccessToken.access_token, 50); }