Last data update: 2014.03.03

R: Extract list of posts from a public Facebook group
getGroupR Documentation

Extract list of posts from a public Facebook group

Description

getGroup retrieves information from a public Facebook group.

Usage

getGroup(group_id, token, n = 100, since = NULL, until = 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

Author(s)

Pablo Barbera pablo.barbera@nyu.edu

See Also

getUsers, getPost, fbOAuth

Examples

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

## End(Not run)

Results