getUsers function

Extract information about one or more Facebook users

Extract information about one or more Facebook users

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.

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.

Examples

## 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)

Author(s)

Pablo Barbera pablo.barbera@nyu.edu

See Also

getFriends, getPost, searchFacebook