Description Usage Arguments Details Author(s) See Also Examples
View source: R/searchFacebook.R
searchFacebook
retrieves public status updates that mention a given keyword
1 | searchFacebook(string, token, n = 200, since = NULL, until = NULL)
|
string |
string or string vector containing keywords to search. Note that the returned results will contain any of the keywords. It is not possible to search for status updates that include all of the keywords. |
token |
An OAuth token created with |
n |
Maximum number of posts to return. |
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 |
Note: Public post search was deprecated with version 2.0 of the Facebook Graph API, and therefore this function will no longer work. For more information about these changes, go to: https://developers.facebook.com/docs/apps/changelog
The function will only work for OAuth tokens generated with version 1.0 of the API, which can no longer be created.
The search is performed also on the text of the comments too, which explains why some of the returned messages do not mention the string that is being searched.
Note that only messages up to around two weeks old or less can be returned.
Pablo Barbera pablo.barbera@nyu.edu
1 2 3 4 5 6 7 8 | ## Not run:
## Searching 100 public posts that mention "facebook"
posts <- searchFacebook( string="facebook", token=fb_oauth, n=100 )
## Searching 100 public posts that mention "facebook" from yesterday
posts <- searchFacebook( string="facebook", token=fb_oauth, n=100,
since = "yesterday 00:00", until = "yesterday 23:59" )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.