#' Get Config
#'
#' @import httr
#'
#' @param key Yahoo App Key
#' @param secret Yahoo App Secret
#'
#' @return httr config object
#' @export
#'
#' @examples get_config(key, secret)
get_config <- function(key, secret) {
endpoint <- oauth_endpoint("get_request_token",
"request_auth",
"get_token",
base_url = "https://api.login.yahoo.com/oauth2")
app <- oauth_app("yahoo",
key = key,
secret = secret,
redirect_uri = "oob")
token <- oauth2.0_token(endpoint,
app,
use_oob = T,
as_header = T,
use_basic_auth = T,
cache = T)
config(token = token)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.