Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/AuthenticateWithInstagramAPI.R
Instagram API Authentication
1 | AuthenticateWithInstagramAPI(appID, appSecret, useCachedToken)
|
appID |
character string specifying the 'App ID' of the Instagram app used for authentication. |
appSecret |
character string specifying the 'API Secret' associated with the Instagram App used for authentication. |
useCachedToken |
logical. If |
OAuth token based authentication with the Instagram API, with caching options for automatic authentication (i.e. avoid using the browser).
In order to collect data from Instagram, the user must first authenticate with Instagram's Application Programming Interface (API). Furthermore, the user must create a Instagram 'app' and get an 'app secret'.
To get a Instagram 'app ID' and 'API secret', please see the Instagram document at: https://instagram.com/developer/authentication/
One problem with Instagram authentication through R is that it normally
requires the user to authenticate using their browser each time they wish to
collect data. The useCachedToken
argument provides a way to
circumvent this, by saving and loading an authenticated 'token' file stored
in the working directory. If the useCachedToken
argument is set to
TRUE
, then the browser is not necessary for future sessions.
An OAuth access token that enables R to make authenticated calls to the Instagram API.
Timothy Graham <timothy.graham3@uq.net.au> & Robert Ackland <robert.ackland@anu.edu.au>
AuthenticateWithTwitterAPI
and
AuthenticateWithYouTubeAPI
and AuthenticateWithFacebookAPI
for
other ways to collect social media data.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
## Use your own values for myAppID and myAppSecret
app_id <- "123456789098765"
app_secret <- "abc123abc123abc123abc123abc123ab"
# Authenticate with the Instagram API using `AuthenticateWithInstagramAPI`
instagram_oauth_token <- AuthenticateWithInstagramAPI(appID=app_id,
appSecret=app_secret, useCachedToken=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.