getUsers: Extract information about one or more Facebook users

Description Usage Arguments Author(s) See Also Examples

View source: R/getUsers.R

Description

getUsers retrieves public information about one or more Facebook users.

After version 2.0 of the Facebook API, only id, name, and picture are available through the API. All the remaining fields will be missing.

Usage

1
getUsers(users, token, private_info = FALSE)

Arguments

users

A vector of user IDs.

token

Either a temporary access token created at https://developers.facebook.com/tools/explorer or the OAuth token created with fbOAuth.

private_info

If FALSE, will return only information that is publicly available for all users (name, gender, locale, profile picture). If TRUE, will return additional information for users who are friends with the authenticated user: birthday, location, hometown, and relationship status. Note that these fields will ONLY be returned for friends and when the version of the token that is used to query the API is 1.0. For other users, they will be NA, even if they are visible on Facebook via web.

Author(s)

Pablo Barbera pablo.barbera@nyu.edu

See Also

getFriends, getPost, searchFacebook

Examples

1
2
3
4
5
6
7
8
## Not run: 
## See examples for fbOAuth to know how token was created.
## Getting information about the authenticated user
 load("fb_oauth")
fb <- getUsers("me", token=fb_oauth)
fb$username

## End(Not run)

Rfacebook documentation built on May 1, 2019, 8:40 p.m.