View source: R/Authenticate.youtube.R
Authenticate.youtube | R Documentation |
YouTube authentication uses OAuth2 and requires a Google Developer API key as described here: https://developers.google.com/youtube/v3/docs/.
## S3 method for class 'youtube' Authenticate(socialmedia, apiKey, ...)
socialmedia |
Character string. Identifier for social media API to authenticate, set to |
apiKey |
Character string. Google developer API key to authenticate. |
... |
Additional parameters passed to function. Not used in this method. |
A credential
object containing an api key $auth
and social media type descriptor
$socialmedia
set to "youtube"
. Object has the class names "credential"
and "youtube"
.
## Not run: # youtube authentication with google developer api key myAPIKey <- "xxxxxxxxxxxx" youtubeAuth <- Authenticate("youtube", apiKey = myAPIKey) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.