Description Usage Arguments Details Value See Also Examples
This function uses the Google+ API to search for a text string in posts. Optionally, search results can be restricted to a certain language.
1 2 | searchPost(q, ret = "data.frame", language = NULL, results = 1,
nextToken = NULL, cr = 0)
|
q |
The query string to search. The string is URL encoded automatically. |
ret |
A string specifying the kind of return value.
Either a |
language |
A language code. See https://developers.google.com/+/api/search#available-languages. |
results |
The approximate number of results that will be retrieved from Google+. |
nextToken,cr |
used internally to retrieve additional pages of answers from the Google+ API. Users won't need to set this argument. |
The result is either a simple list of items from the page
that can be parsed using parsePost
or a data
frame with that function already applied.
The length of the list or the number of rows of the data
frame are somewhat ambiguous. Specifying the results
argument will try to get that many results. But there may
be less (because Google could not find more) or more
(because Google is organizing results on pages and it would
be a waste to discard them automatically). If you really
depend on getting not more rows than you expected, use
standard selection (i.e. [
) to trim the results.
The function returns a list or a data frame containing all
available data on the posts that met the search criteria.
See Details
for more on its content.
Google+ API documentation: https://developers.google.com/+/api/latest/activities/search.
1 2 3 4 | ## Not run:
searchPost("#cats")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.