user_friends: A function to output the friends of one user

View source: R/user_friends.R

user_friendsR Documentation

A function to output the friends of one user

Description

This function will accept a screen name of a user and output the name, screen name, and names of the user's friends.

Usage

user_friends(screen_name, number = 195)

Arguments

screen_name

A string of one Twitter screen name

number

The number of friends to output, the default is 195.

Details

This will only work correctly with users that have public profiles, or if you are authenticated or granted access.

Value

A DataFrame that contains the following columns:

name

The name of the user

screen_name

The screen name of the user

description

The description of the user

Author(s)

Ling Xiang Zou

References

https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friends-list

Examples

#user_friends(screen_name ="BarackObama", 10)

tangaot/twitterapiR documentation built on March 24, 2022, 12:40 p.m.