sf_connect <- function(host, user, password, token) {
if(is.null(host))
stop('host is NULL.')
if(is.null(user))
stop("user is NULL")
if(is.null(password))
stop("password is NULL")
pw <- paste0(password,token)
apiVersion <- "26.0"
con <- rforcecom.login(username, pw, host, apiVersion)
#Check if we got an response
if(length(con) != 3) {
stop(paste0("Cannot connect to host:", host))
}
#Return
con
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.