Processing
 

TwitteR setup_twitter_oauth() gives an error

26/08/2016 14:38#1

Wilcar

Member

Joined at: 4 months ago

Post: 1

Thank: 0

Thanked: 0

I am using twitteR package for the first time. The setup_twitter_oauth function gives me an error:

[1] "Using browser based authentication" Error in curl::curl_fetch_memory(url, handle = handle) :  Couldn't connect to server 

or

[1] "Using browser based authentication" Error in init_oauth1.0(self$endpoint, self$app, permission = self$params$permission, : Bad Request (HTTP 400). 

My code:

library(dplyr) library(purrr) library(twitteR)   setup_twitter_oauth(getOption("twitter_consumer_key"),                     getOption("twitter_consumer_secret"),                     getOption("twitter_access_token"),                     getOption("twitter_access_token_secret")) 

I am using Rstudio and Windows 7 with a proxy.

27/08/2016 16:29Top#2

Hack-R

Member

Joined at: 7 months ago

Post: 2

Thank: 0

Thanked: 0

I believe the problem is that you're literally passing in those strings as arguments to setup_twitter_oath. They should be replaced by access tokens that Twitter gives you when you register your app.

You can assign the actual credentials to objects like

my_key, my_secret, my_access_token, my_access_secret

and then connect like this:

setup_twitter_oauth(my_key, my_secret, my_access_token, my_access_secret) 

I noticed that if I try to connect with no credential or fake credentials that I get the same error you were experiencing from setup_twitter_oauth.

Make sure not to quote those objects or they're considered literal character strings.

Similar articles

How do twitter giveaways work?

8 months ago - Reply: 2 - Views: 126

How may I get genuine followers on Twitter?

3 years ago - Reply: 33 - Views: 1,828

Login to Twitter sometime fail

6 months ago - Reply: 1 - Views: 23

Twitter doesn't accept PHP's cURL, but Linux'

1 year ago - Reply: 2 - Views: 90

Twitter OAuth on iOS

5 months ago - Reply: 1 - Views: 92

why am i getting an error on .verifyCredentials()

5 months ago - Reply: 1 - Views: 35

TwitteR setup_twitter_oauth() gives an error

5 months ago - Reply: 1 - Views: 29

Tweepy - Getting the author of a retweeted tweet

5 months ago - Reply: 0 - Views: 4

Retrieving data from twitter with JavaScript

5 months ago - Reply: 0 - Views: 2

Combined social media feed returning the wrong data

5 months ago - Reply: 0 - Views: 0

Django and Twitter request_token

5 months ago - Reply: 0 - Views: 0

Python HMAC hashed value encoding to base64

5 months ago - Reply: 1 - Views: 32

At the rate symbol in facebook

5 months ago - Reply: 0 - Views: 1

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re