Learn R Programming

instaR (version 0.2.4)

getUserMedia: Extract recent media published by a user.

Description

getUserMedia retrieves public media from a given user and, optionally, downloads recent pictures to a specified folder.

IMPORTANT: After June 1st, 2016 only applications that have passed permission review by Instagram will be allowed to access data for users other than the authenticated user. See https://www.instagram.com/developer/review/ for more information.

Usage

getUserMedia(username, token, n = 30, folder = NULL, userid = NULL, verbose = TRUE)

Arguments

username
String, screen name of user.
token
An OAuth token created with instaOAuth.
n
Maximum number of media to return. Currently it is only possible to download the 20 most recent pictures or videos on the authenticated user's profile, unless Instagram has approved the application.
folder
If different than NULL, will download all pictures to this folder.
userid
Numeric ID of user.
verbose
If TRUE (default), outputs details about progress of function on the console.

Examples

Run this code
## Not run: 
# ## See examples for instaOAuth to know how token was created.
# ## Capturing information about 50 most recent pictures by @barackobama
#  load("my_oauth")
#  obama <- getUserMedia( username="barackobama", token=my_oauth, n=50, folder="barackobama")
# ## End(Not run)

Run the code above in your browser using DataLab