## Not run:
# securityCode <- createCode()
# shinyServer(function(input, output, session)){
#
# AuthCode <- reactive({
#
# authReturnCode(session, securityCode)
#
# })
#
# output$AuthGAURL <- renderUI({
#
# a("Click Here to Authorise Your Google Analytics Access",
# href=shinygaGetTokenURL(securityCode)
# )
# })
#
# AccessToken <- reactive({
# validate(
# need(AuthCode(), "Authenticate To See")
# )
#
# access_token <- shinygaGetToken(code = AuthCode())
#
# token <- access_token$access_token
#
# })
# }
# ## End(Not run)
Run the code above in your browser using DataLab