# NOT RUN {
# log in using basic authentication (username-password)
ig_auth(username = "test@gmail.com",
password = "test_password")
# log in using OAuth 2.0
# Via brower or refresh of .httr-oauth-Rinstapkg
options(Rinstapkg.client_id = "012345678901-99thisisatest99")
options(Rinstapkg.client_secret = "Th1s1sMyC1ientS3cr3t")
ig_auth()
# Save token and log in using it
saveRDS(.state$token, "token.rds")
ig_auth(token = "token.rds")
# }
Run the code above in your browser using DataLab