Description Usage Arguments Value Note Author(s) See Also Examples
Authenticate
creates a credential
object that enables R to
make authenticated calls to social media APIs. A credential
object
is a S3 object with the authentication-related information such as access
tokens and the information on the social media that grant authentication.
Authenticate
is the first step of the Authenticate
,
Collect
, Create
workflow.
1 | Authenticate(socialmedia, ...)
|
socialmedia |
character string, social media API to authenticate, currently supports "facebook", "youtube", "twitter" and "instagram" |
... |
additional parameters for authentication
|
credential object with authentication information
Currently, Authenticate
with socialmedia = "twitter" generates
oauth information to be used in the current active session only (i.e.
"side-effect") and no authentication-related information will be stored in
the returned credential
object.
Chung-hong Chan <chainsawtiney@gmail.com>
AuthenticateWithFacebookAPI
,
AuthenticateWithInstagramAPI
,
AuthenticateWithYoutubeAPI
,
AuthenticateWithTwitterAPI
, SaveCredential
,
LoadCredential
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
require(magrittr)
## Instagram ego network example
myAppID <- "123456789098765"
myAppSecret <- "abc123abc123abc123abc123abc123ab"
myUsernames <- c("senjohnmccain","obama")
Authenticate("instagram",
appID = myAappId,
appSecret = myAppSecret) %>% Collect(ego = TRUE,
username = myUsernames) %>% Create
## YouTube actor network example
my_apiKeyYoutube <- "314159265358979qwerty"
videoIDs <- c("W2GZFeYGU3s","mL27TAJGlWc")
Authenticate("youtube",
apiKey = my_apiKeyYoutube) %>% Collect(videoIDs = videoIDs) %>% Create('actor')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.