Learn R Programming

twitteR (version 0.1.3)

getUser: Functions to manage Twitter users

Description

These functions allow you interact with information about a Twitter user - retrieving their base information, list of friends, list of followers, and an up to date timeline.

Usage

getUser(user, session = getCurlHandle())
userFriends(user, session = getCurlHandle())
userFollowers(user, session = getCurlHandle())

Arguments

user
The Twitter user to detail, can be character or an user object.
session
A session object from initSession

Value

  • The getUser function returns an object of class user.

    The functions userFriends and userFollowers return lists of class user objects.

Details

These functions will only return fully formed objects if the authenticated user is allowed to see the requested user. If that person has a private account and has not allowed you to see them, you will not be able to extract that information.

See Also

initSession, mentions

Examples

Run this code
sess <- initSession('myuser', 'mypass')
      tuser <- getUser('twitter', sess)
      tfriends <- userFriends(tuser, sess)
      tfollowers <- userFollowers(tuser, sess)
      ttimeline <- userTimeline(tuser, sess)

Run the code above in your browser using DataLab