1\name{setup_twitter_oauth} 2\alias{setup_twitter_oauth} 3\title{ 4Sets up the OAuth credentials for a twitteR session 5} 6\description{ 7This function wraps the OAuth authentication handshake functions from the 8httr package for a twitteR session 9} 10\usage{ 11setup_twitter_oauth(consumer_key, consumer_secret, access_token=NULL, access_secret=NULL) 12} 13\arguments{ 14 \item{consumer_key}{The consumer key supplied by Twitter} 15 \item{consumer_secret}{The consumer secret supplied by Twitter} 16 \item{access_token}{The access token supplied by Twitter} 17 \item{access_secret}{The access secret supplied by Twitter} 18} 19\details{ 20 The \code{httr} package can cache authentication. See \code{\link{Token}} for 21 details 22 23 If both \code{access_token} and \code{access_secret} are set (i.e. not \code{NULL}), 24 these will be supplied directly to the OAuth authentication instead of the browser 25 based authentication dance one would normally experience. This requires you to already 26 know the access tokens for your Twitter app. The usefuleness of this feature is primarily 27 in a headless environment where a web browser is not available. 28} 29\value{ 30 This is called for its side effect 31} 32\author{ 33Jeff Gentry 34} 35\seealso{ 36\code{\link{Token}}, \code{\link{GET}}, \code{\link{POST}} 37} 38\examples{ 39 \dontrun{ 40 setup_twitter_oauth("CONSUMER_KEY", "CONSUMER_SECRET") 41 } 42} 43\keyword{interface}