-
Notifications
You must be signed in to change notification settings - Fork 221
Timelines
linvi edited this page Jun 10, 2015
·
4 revisions
Timelines is at the core of Twitter. They are a collection of tweets that are based on a user. At the current time you can access 4 types of Timelines.
- Home Timeline : Tweets displayed in the authenticated user timeline.
- User Timeline : Tweets displayed in a user timeline.
- Mention Timeline : Returns the most recent mentions (tweets containing a users’s @screen_name) for the authenticated user.
- Retweets of Tweet Timeline : Returns the most recent tweets authored by the authenticating user that have been retweeted by others.
Each of this Timeline can be invoked simply using Timeline.Get...Timeline();
. Additionally each of these methods have their own specific Parameters class that can be used to have more control over the request you want to perform.
IMPORTANT NOTE : Timelines should not be used to get live content. If you need to refresh the Timeline of a specific user more than once every minute it probably means that you want to use a Stream.
// Get the latest 40 tweets published on your timeline
var tweets = Timeline.GetHomeTimeline();
// Get more control over the request with a HomeTimelineParameters
var homeTimelineParameter = new HomeTimelineParameters
{
MaximumNumberOfTweetsToRetrieve = 100,
// ... setup additional parameters
};
var tweets = Timeline.GetHomeTimeline(homeTimelineParameter);
// Get the latest 40 tweets published on the user timeline
var tweets = Timeline.GetUserTimeline(<user_identifier>);
// Get more control over the request with a UserTimelineParameters
var userTimelineParameters = new UserTimelineParameters();
var tweets = Timeline.GetUserTimeline(<user_identifier>, userTimelineParameters);
// Get the latest 40 tweets published on the mentions timeline
var tweets = Timeline.GetMentionsTimeline(mentionsTimelineParameters);
// Get more control over the request with a MentionsTimelineParameters
var mentionsTimelineParameters = new MentionsTimelineParameters();
var tweets = Timeline.GetMentionsTimeline(mentionsTimelineParameters);
// Get the latest 40 tweets published on the retweets timeline
var tweets = Timeline.GetRetweetsOfMeTimeline(retweetsOfMeTimelineRequestParameter);
// Get more control over the request with a RetweetsOfMeTimelineRequestParameter
var retweetsOfMeTimelineRequestParameter = new RetweetsOfMeTimelineRequestParameter();
var tweets = Timeline.GetRetweetsOfMeTimeline(retweetsOfMeTimelineRequestParameter);