Skip to content

4.0 Trends

Thomas Imart edited this page Apr 7, 2020 · 1 revision

Overview

Twitter offers to share the trending topics on its platform.

Retrieve trends

Twitter lets you get trending subjects at specific location (Yahoo GEO ID).

Here is how to get the trending topics with the library.

var trendingTopics = Trends.GetTrendsAt(42); // where 42 is a WOEID

Get a sample of trending tweets

In order to get some tweets from a trend you just have to search for the trending keyword.

var trends = Trends.GetTrendsAt(1);

var trendTermToSearch = trends.Trends.ToList()[0].Name;
var tweets = Search.SearchTweets(trendTermToSearch);

Available Trends Locations

This endpoint give you a list of location that can be used to get retrieve Trends.

var trendLocations = Trends.GetAvailableTrendLocations();

Closest Trends Locations

This endpoint give you a list of the closest locations that have trending topics.

var closestTrendLocations = Trends.GetClosestTrendLocations(37.8, -122.4);
Clone this wiki locally