Rfacebook (version 0.6.15)

getGroup: Extract list of posts from a public Facebook group

Description

getGroup retrieves information from a public Facebook group.

Usage

getGroup(group_id, token, n = 25, since = NULL, until = NULL,
  feed = TRUE, api = NULL)

Arguments

group_id
Facebook ID for the group. Note that this is different from the name on the URL. You can use searchGroup to find the ID.
token
Either a temporary access token created at https://developers.facebook.com/tools/explorer or the OAuth token created with fbOAuth.
n
Number of posts of page to return. Note that number can be sometimes higher or lower, depending on status of API.
since
A UNIX timestamp or strtotime data value that points to the start of the time range to be searched. For more information on the accepted values, see: http://php.net/manual/en/function.strtotime.php
until
A UNIX timestamp or strtotime data value that points to the end of the time range to be searched. For more information on the accepted values, see: http://php.net/manual/en/function.strtotime.php
feed
If TRUE, the function will also return posts on the group that were made by others (not only the admin of the group). Note that, unlike in getPage, here TRUE is the default option.
api
API version. e.g. "v2.8". NULL is the default.

See Also

getUsers, getPost, fbOAuth

Examples

Run this code
## Not run: ------------------------------------
# ## Find Facebook ID for R-Users Facebook group
# load("fb_oauth")
# ids <- searchGroup(name="rusers", token=fb_oauth)
#  ids[1,] # id = 18533493739
# ## Downloading posts from R-Users Facebook group
#  group <- getGroup(group_id=18533493739, token=fb_oauth)
# ## Downloading posts from R-Users Facebook group in January 2013
#  group <- getGroup(group_id=18533493739, token=fb_oauth,
# 	since='2013/01/01', until='2013/01/31')
## ---------------------------------------------

Run the code above in your browser using DataLab