Couldn't find secret in environment variable TWITTER_CONSUMER_SECRET


#1

I want to get tweets from twitter using R and I already followed all steps which shown in the https://www.credera.com/blog/business-intelligence/twitter-analytics-using-r-part-1-extract-tweets/ website but it gives me that error


any solution for this?


#2

I can’t tell what exact thing is wrong there, but that tutorial is pretty old, and uses twitteR package that’s no longer maintained.

I would try using https://rtweet.info/ instead


#3

Couldn’t find secret in environment variable TWITTER_CONSUMER_SECRET

Instead of hardcoding your credentials in the file, it looks like you should be setting it as part of the environment. On a linux command line it would look something like this:

TWITTER_CONSUMER_KEY=123 TWITTER_CONSUMER_SECRET=abc ./twitter-app

#4

i use windows not linux