Description Usage Arguments Details Value Author(s) References See Also Examples
Using the twitter API, gets the status updates of a given user (up to 3,200)
1 2 3 |
screen_name |
of the user |
twitter_token |
An object of class Token1.0 as generated by tw_gen_token. |
user_id |
The ID of the user for whom to return results for |
since_id |
Returns results with an ID greater than (that is, more recent than) the specified ID |
count |
Number of statuses to get |
max_id |
Returns results with an ID less than (that is, older than) or equal to the specified ID |
exclude_replies |
This parameter will prevent replies from appearing in the returned timeline |
include_rts |
When set to false, the timeline will strip any native retweets |
quietly |
Whether or not to show the 'success' message |
... |
Additional arguments passed to |
This function is designed to be applied to a large list of twitter accounts, see the example below.
Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters.
A data.frame with tweets (if success), with the following columns:
screen_name
in_reply_to_screen_name
user_id
created_at
id
text
source
truncated
retweet_count
favourites_count
favorited
retweeted
coordinates
source_name
otherwise returns NULL
.
George G. Vega Yon
Twitter REST API (GET statuses/user_timeline) https://dev.twitter.com/rest/reference/get/statuses/user_timeline
Other API functions: tw_api_get_followers_ids
,
tw_api_get_followers_list
,
tw_api_get_friends_ids
,
tw_api_get_search_tweets
,
tw_api_get_statuses_sample
,
tw_api_get_trends_place
,
tw_api_get_users_search
,
tw_api_get_users_show
,
tw_api_trends_available
,
tw_gen_token
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# List of twitter accounts
users <- c('MarsRovers', 'senatormenendez', 'sciencemagazine')
# Getting the twitts (first gen the token)
key <- tw_gen_token('myapp','key', 'secret')
tweets <- lapply(users, tw_api_get_statuses_user_timeline, twitter_token=key)
# Processing the data (and taking a look)
tweets <- do.call(rbind, tweets)
head(tweets)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.