From 0af6656451c88831a905b0a27102522749abb6e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Barber=C3=A1?= Date: Tue, 11 Jul 2017 16:00:08 -0700 Subject: [PATCH] fixes #132 (updated documentation) --- Rfacebook/R/getLikes.R | 14 +++++++------- Rfacebook/man/getLikes.Rd | 14 +++++++------- Rfacebook/man/getUsers.Rd | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Rfacebook/R/getLikes.R b/Rfacebook/R/getLikes.R index a1e472e..8a0994a 100644 --- a/Rfacebook/R/getLikes.R +++ b/Rfacebook/R/getLikes.R @@ -2,17 +2,17 @@ #' @export #' #' @title -#' Extract list of likes of a Facebook friend +#' Extract list of likes of the authenticated Facebook user #' #' @description -#' \code{getLikes} retrieves information about a friend's likes. -#' To retrieve the number of likes for a page, use \code{getUsers} -#' with the page IDs. +#' \code{getLikes} retrieves information about the authenticated use +#' only (not any friend). To retrieve the number of likes for a page, +#' use \code{getUsers} with the page IDs. #' #' @details #' #' This function requires the use of an OAuth token with the following -#' permissions: user_likes, friends_likes +#' permission: user_likes #' #' @author #' Pablo Barbera \email{pbarbera@@usc.edu} @@ -22,7 +22,7 @@ #' \url{https://developers.facebook.com/tools/explorer} or the OAuth token #' created with \code{fbOAuth}. #' -#' @param user A user ID or screen name. +#' @param user The name of the user. By default, "me". #' #' @param n Maximum number of likes to return for each user. #' @@ -32,7 +32,7 @@ #' } #' -getLikes <- function(user, n=500, token){ +getLikes <- function(user="me", n=500, token){ query <- paste0('https://graph.facebook.com/', user, '?fields=likes.limit(', n, ').fields(id,name,website)') content <- callAPI(query, token) diff --git a/Rfacebook/man/getLikes.Rd b/Rfacebook/man/getLikes.Rd index 5be89df..f989a42 100644 --- a/Rfacebook/man/getLikes.Rd +++ b/Rfacebook/man/getLikes.Rd @@ -2,12 +2,12 @@ % Please edit documentation in R/getLikes.R \name{getLikes} \alias{getLikes} -\title{Extract list of likes of a Facebook friend} +\title{Extract list of likes of the authenticated Facebook user} \usage{ -getLikes(user, n = 500, token) +getLikes(user = "me", n = 500, token) } \arguments{ -\item{user}{A user ID or screen name.} +\item{user}{The name of the user. By default, "me".} \item{n}{Maximum number of likes to return for each user.} @@ -16,13 +16,13 @@ getLikes(user, n = 500, token) created with \code{fbOAuth}.} } \description{ -\code{getLikes} retrieves information about a friend's likes. -To retrieve the number of likes for a page, use \code{getUsers} -with the page IDs. +\code{getLikes} retrieves information about the authenticated use +only (not any friend). To retrieve the number of likes for a page, +use \code{getUsers} with the page IDs. } \details{ This function requires the use of an OAuth token with the following -permissions: user_likes, friends_likes +permission: user_likes } \examples{ \dontrun{ diff --git a/Rfacebook/man/getUsers.Rd b/Rfacebook/man/getUsers.Rd index 2618792..b082fee 100644 --- a/Rfacebook/man/getUsers.Rd +++ b/Rfacebook/man/getUsers.Rd @@ -4,7 +4,7 @@ \alias{getUsers} \title{Extract information about one or more Facebook users} \usage{ -getUsers(users, token, private_info = FALSE) +getUsers(users, token, private_info = FALSE, api = "v2.9") } \arguments{ \item{users}{A vector of user IDs.}