Package instar. November 10, 2015



Similar documents
Package uptimerobot. October 22, 2015

Package retrosheet. April 13, 2015

Package OECD. R topics documented: January 17, Type Package Title Search and Extract Data from the OECD Version 0.2.

Package searchconsoler

Package pdfetch. R topics documented: July 19, 2015

Package sendmailr. February 20, 2015

Building Secure Applications. James Tedrick

Package WikipediR. January 13, 2016

Package whoapi. R topics documented: June 26, Type Package Title A 'Whoapi' API Client Version Date Author Oliver Keyes

Package wordnet. January 6, 2016

Package TSfame. February 15, 2013

Package RIGHT. March 30, 2015

Package decompr. August 17, 2016

Package hoarder. June 30, 2015

Package translater. R topics documented: February 20, Type Package

Package pinnacle.api

How To Set Up A Scopdial On A Pc Or Macbook Or Ipod (For A Pc) With A Cell Phone (For Macbook) With An Ipod Or Ipo (For An Ipo) With Your Cell Phone Or

SSO Plugin. Integration for BMC MyIT and SmartIT. J System Solutions. Version 4.0

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

Package httprequest. R topics documented: February 20, 2015

Salesforce Opportunities Portlet Documentation v2

Configuration Guide - OneDesk to SalesForce Connector

Marcum LLP MFT Guide

Package urltools. October 11, 2015

Sample HP OO Web Application

Installing the ASP.NET VETtrak APIs onto IIS 5 or 6

How to create an Expense Report through iexpense in the iphone Mobile App

Cloud Elements ecommerce Hub Provisioning Guide API Version 2.0 BETA

How To Print From Ait Mobile Printing Service On Iphone Or Android (For Android) Or Ipad (For Mac) From Ai Or Ipod (For Ipad) From Your Computer Or Ipads Or Ipa (For A

SYSPRO App Store: Registration Guide

Quick Reference Guide PAYMENT GATEWAY (Virtual Terminal)

Fax User Guide 07/31/2014 USER GUIDE

How to pull content from the PMP into Core Publisher

Matrix Logic WirelessDMS Service 2.0

From Delphi to the cloud

Package erp.easy. September 26, 2015

Eylean server deployment guide

Package sjdbc. R topics documented: February 20, 2015

Package ggrepel. February 8, 2016

Package brewdata. R topics documented: February 19, Type Package

Package bigrf. February 19, 2015

TCP/IP Networking, Part 2: Web-Based Control

Beyond The Web Drupal Meets The Desktop (And Mobile) Justin Miller Code Sorcery Workshop, LLC

Admin Guide Product version: Product date: November, Technical Administration Guide. General

Decryption. Palo Alto Networks. PAN-OS Administrator s Guide Version 6.0. Copyright Palo Alto Networks

Package RCassandra. R topics documented: February 19, Version Title R/Cassandra interface

DocuSign for SharePoint

Webmail Using the Hush Encryption Engine

Searching your Archive in Outlook (Normal)

Package MBA. February 19, Index 7. Canopy LIDAR data

Install SQL Server 2014 Express Edition

Egnyte Single Sign-On (SSO) Installation for OneLogin

Interlink Networks Secure.XS and Cisco Wireless Deployment Guide

Salesforce Integration User Guide Version 1.1

LifeSize UVC Video Center Deployment Guide

Chhattisgarh State Skill Development Authority (CSSDA) Guidelines for. Biometric Device Manufacturers for. Interfacing with

Cloud Backup for Joomla

P-Synch by M-Tech Information Technology, Inc. ID-Synch by M-Tech Information Technology, Inc.

Package RedditExtractoR

Contents. 2 Alfresco API Version 1.0

Package syuzhet. February 22, 2015

Package packrat. R topics documented: March 28, Type Package

My IC Customizer: Descriptors of Skins and Webapps for third party User Guide

What's New in ADP Reporting?

Package franc. R topics documented: November 12, Title Detect the Language of Text Version 1.1.1

Web Services for Management Perl Library VMware ESX Server 3.5, VMware ESX Server 3i version 3.5, and VMware VirtualCenter 2.5

SQL EXPRESS INSTALLATION...

Login with other services to ASP.NET websites with TMS Cloud Pack for.net

Jet Data Manager 2012 User Guide

User-ID Features. PAN-OS New Features Guide Version 6.0. Copyright Palo Alto Networks

This section contains information intended to help plan for SocialMiner installation and deployment.

Getting Started with the icontact API

Brainshark/Salesforce.com Integration Installation Procedures

RCS Liferay Google Analytics Portlet Installation Guide

Final Year Project Interim Report

OneLogin Integration User Guide

Package fimport. February 19, 2015

NS DISCOVER 4.0 ADMINISTRATOR S GUIDE. July, Version 4.0

Computer Networking LAB 2 HTTP

Tenable for CyberArk

Mahara: MyPortfolio. Create content Build pages Share. A user guide for beginners. What is Mahara?

Axway API Gateway. Version 7.4.1

Installation and Administration Guide

Package EasyHTMLReport

Getting Started Guide for Developing tibbr Apps

Package AzureML. August 15, 2015

OAuth 2.0 Developers Guide. Ping Identity, Inc th Street, Suite 100, Denver, CO

Avigilon Control Center System Integration Guide

versasrs HelpDesk quality of service

CA Service Desk Manager - Mobile Enabler 2.0

Online signature API. Terms used in this document. The API in brief. Version 0.20,

A How To guide for integrating your application to the CRM Hub

Technical Support Set-up Procedure

Package tagcloud. R topics documented: July 3, 2015

Transcription:

Title Access to Instagram API via R Package instar November 10, 2015 Provides an interface to the Instagram API <https://instagram.com/developer/>, which allows R users to download public pictures filtered by hashtag, popularity, user or location, and to access public users' profile data. Version 0.2.2 Date 2015-11-09 Author Pablo Barbera [aut, cre], Tiago Dantas [ctb], Jonne Guyt [ctb] Maintainer URL https://github.com/pablobarbera/instar BugReports https://github.com/pablobarbera/instar/issues Depends R (>= 2.12.0), httr, rjson License GPL-2 Collate 'getfollowers.r' 'getfollows.r' 'getuser.r' 'getusermedia.r' 'instaoauth.r' 'searchinstagram.r' 'utils.r' 'gettagcount.r' 'getcomments.r' 'getlikes.r' 'getpopular.r' 'getlocation.r' NeedsCompilation no Repository CRAN Date/Publication 2015-11-10 09:41:27 R topics documented: getcomments........................................ 2 getfollowers......................................... 2 getfollows.......................................... 3 getlikes........................................... 4 getlocation......................................... 5 getpopular.......................................... 5 gettagcount......................................... 6 getuser........................................... 7 getusermedia........................................ 7 instaoauth......................................... 8 searchinstagram....................................... 9 1

2 getfollowers Index 11 getcomments Returns up to 150 comments on an instagram post getcomments retrieves up to 150 recent comments on an instagram post, including text, author and date. getcomments(id,, = TRUE) id String, id of instagram post. An OAuth created with instaoauth. ## Downloading list of followers of @senjohnmccain obama <- getusermedia( username="barackobama", =my_oauth ) comments <- getcomments( obama$id[1], =my_oauth ) getfollowers Get the list of users this user is followed by. getfollowers retrieves the list of users that follow a given user, as well as basic information about all of them. getfollowers(username,, userid = NULL, = TRUE)

getfollows 3 username userid String, screen name of user. An OAuth created with instaoauth. Numeric ID of user. ## Downloading list of followers of @senjohnmccain mccain <- getfollowers( username="senjohnmccain", =my_oauth ) getfollows Get the list of users a user follows. getfollows retrieves the list of users that a given user follows, as well as basic information about all of them. getfollows(username,, userid = NULL, = TRUE) username userid String, screen name of user. An OAuth created with instaoauth. Numeric ID of user.

4 getlikes ## Downloading list of users that @senjohnmccain follows mccain <- getfollows( username="senjohnmccain", =my_oauth ) getlikes Get the list of users who liked a photo. getlikes retrieves the list of users who liked a photo. getlikes(id,, = TRUE) id Numeric ID of photo. An OAuth created with instaoauth. Tiago Dantas <t.mendesdantas@gmail.com> ## Downloading list of users who liked @barackobama s most recent photo obama <- getusermedia( username="barackobama", =my_oauth, n=1) likes <- getlikes(obama$id[1], =my_oauth)

getlocation 5 getlocation Get basic information about a location using a location ID getlocation retrieves location information getlocation(location_id, ) location_id numeric, location id. An OAuth created with instaoauth. Jonne Guyt <j.y.guyt@uva.nl> ## Capturing information about a location loc_id_info <- getlocation( location_id=423423, =my_oauth,) getpopular Returns 24 popular instagram posts information getpopular retrieves up to 24 popular instagram posts getpopular(, = TRUE) An OAuth created with instaoauth.

6 gettagcount Jonne Guyt <j.y.guyt@uva.nl> ## Downloading list of popular instagram posts popular_posts <- getpopular(=my_oauth ) gettagcount Get number of times a tag has been used gettagcount retrieves a count of the number of times a tag has been used in comments to a picture or video. gettagcount(tag, ) tag Hashtag used to filter media. An OAuth created with instaoauth. ## Capturing information about #nofilter gettagcount( tag="nofilter, =my_oauth,)

getuser 7 getuser Get basic information about a user getuser retrieves public information about Instagram user getuser(username,, userid = NULL) username userid String, screen name of user. An OAuth created with instaoauth. Numeric ID of user. ## Capturing information about @barackobama obama <- getuser( username="barackobama", =my_oauth,) getusermedia Extract recent media published by a user. getusermedia retrieves public media from a given user and, optionally, downloads recent pictures to a specified folder. getusermedia(username,, n = 30, folder = NULL, userid = NULL, = TRUE)

8 instaoauth username n folder userid String, screen name of user. An OAuth created with instaoauth. Maximum number of media to return. If different than NULL, will download all pictures to this folder. Numeric ID of user. ## Capturing information about 50 most recent pictures by @barackobama obama <- getusermedia( username="barackobama", =my_oauth, n=50, folder="barackobama") instaoauth Create OAuth to Intagram R session instaoauth creates an OAuth access that enables R to make authenticated calls to the Instagram API. The can be saved as a file in disk to be re-used in future sessions. This function relies on the httr package to create the OAuth, and is a simplified version of one of its examples. instaoauth(app_id, app_secret, scope = "basic") app_id app_secret scope numeric, Client ID of application to be used to create OAUth. Available at http://instagram.com/developer string, Client Secret of application to be used to create OAUth. Available at http://instagram.com/developer. string, specifies scope of access to the authenticated user data. See http:// instagram.com/developer/authentication/#scope for available options.

searchinstagram 9 Details To obtan your app_id and app_secret, do the following steps. First, go to http://instagram. com/developer/ and register your application with any name. Then, run the instaoauth function with your "Client ID" and "Client Secret" as arguments. It will return a URL, which you will need to paste into the field "OAuth redirect_uri" in your application settings on Instagram. After changing it, press Enter in R. A new browser window will open and sign the. If everything works works well, you will get a message that says you can return to R. See Also searchinstagram ## an example of an authenticated request after creating the OAuth ## where app_id and app_secret are fictitious, and is saved for ## future sessions my_oauth <- instaoauth(app_id="123456789", app_secret="1a2b3c4d") save(my_oauth, file="my_oauth") obama <- searchinstagram(tag="obama", =my_oauth) searchinstagram Search public media that mention a specific hashtag, or that were sent from a given area searchinstagram retrieves public pictures and video whose caption mentions a given hashtag, or that were sent within a given area, delimited by a set of coordinates and a radius. It returns a data frame with information about each picture or video, and optionally will download all pictures to a specific folder searchinstagram(tag = NULL,, n = 100, lat = NULL, lng = NULL, distance = NULL, folder = NULL, mindate = NULL, maxdate = NULL, = TRUE, sleep = 0)

10 searchinstagram tag n lat lng Details distance folder mindate maxdate Hashtag used to filter media. It is only possible for a single hashtag. An OAuth created with instaoauth. Maximum number of media to return. Latitude of the center search coordinate Longitude of the center search coordinate Default is 1km (distance=1000), max distance is 5km. If different than NULL, will download all pictures to this folder. Minimum date for search period Maximum date for search period sleep Number of seconds between API calls (default is 0). It is only possible to apply one filter at a time: either search by hashtag OR search by coordinates. The mindate and maxdata search parameters only work when searching by location, not when searching by tag. See Also instaoauth ## Searching and downloading 100 public media that mention #obama obama <- searchinstagram( tag="obama", =my_oauth, n=100, folder="obama") ## Searching and downloading pictures sent from Times Square with a minimum date ## of 2013-12-31 and a maximum date of 2014-01-01 tsq <- searchinstagram( lat=40.7577, lng=-73.9857, distance=500, =my_oauth, n=500, folder="timessquare", mindate="2014-12-31", maxdate="2014-01-01")

Index getcomments, 2 getfollowers, 2 getfollows, 3 getlikes, 4 getlocation, 5 getpopular, 5 gettagcount, 6 getuser, 7 getusermedia, 7 instaoauth, 8, 10 searchinstagram, 9, 9 11