Skip to content

Get a user's tweets

Neeraj Lagwankar edited this page Feb 6, 2019 · 4 revisions

Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters.

Documentation

Parameters

?user_id=USER-ID-HERE - Get a user's tweets according to their unique ID

?screen_name=SCREEN-NAME-HERE - Get a user's tweets according to their @username

&count=3 - Return this many tweets, up to a maximum of 200

&trim_user=true - Trim the response to include only tweets, and the user ID for each tweet

&exclude_replies=true - Remove all of the replies to the user's tweets from the response

&include_rts=false - Remove all of the retweets of the user's tweets from the response

Usage

Resource URL: $url = "https://api.twitter.com/1.1/statuses/user_timeline.json";

Request Method: $requestMethod = "GET";

GET Field: $getfield = '?screen_name=SCREEN-NAME-HERE&count=3';

Clone this wiki locally