Description Usage Arguments Examples
Log in using Basic (Username-Password) or OAuth 2.0 authenticaion. OAuth does
not require sharing passwords, but will require authorizing Rinstapkg
as a connected app to view and manage your account. You will be directed to
a web browser, asked to sign in to your Instagram account, and to grant Rinstapkg
permission to operate on your behalf. By default, these user credentials are
cached in a file named .httr-oauth-Rinstapkg
in the current working directory.
1 2 3 4 5 |
username |
Instagram username, use the handle without the "@" sign or an email |
password |
Instagram password |
token |
optional; an actual token object or the path to a valid token
stored as an |
client_id, client_secret, callback_url |
the "Client Id","Client Secret",
and "Callback URL" when using a connected app. The |
cache |
logical or character; TRUE means to cache using the default cache
file |
verbose |
logical; do you want informative messages? |
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.