Please help. I am doing my final college project about research regarding 2019 Presidential Election in Indonesia. I use data from Twitter to predict the results of the election. I want to extract tweets every 2 weeks from September 2018 to January 2019, but I cannot collect tweets past 7 days from now. So I apply for developer account to use the full archive search API to collect tweets from September 2018. My developer account already approved, I already create an app, and I already set the dev environment to my app. But I still cannot extract tweets past 7 days from now using my old code. So I search the solution and I found this code :

There’s no R implementation of the full archive search unfortunately, and writing your own R code for it might get a bit involved, also you don’t need to extract the access token every time - you can reuse the same one over and over.

If you have a ~/.twitter_keys.yaml file like the readme describes (endpoint will be https://api.twitter.com/1.1/tweets/search/fullarchive/my_env_label.json), a file called test_search.json will be created with 100 tweets for #JokowiLagi for that date range in that example call.

I already installed searchtweets and I just create a file twitter_keys.yaml for the credential just like in the github. The .yaml file contains the same as the github (except for the endpoint, customer key and secret).

But I stuck in this point. I don’t know about filename or yaml_key in the load_credentials’ parameters. What should I input in the filename and yaml_key? And can you give me the example about the input?

What should I change in the search_tweets.py code?
What is the meaning of that ValueError?
Is there any mistake in the changes I made above?
It will be helpful if you can provide some examples about the changes in search_tweets.py.

I want to extract data from 2017 and real-time also, and I faced the same your problem which is the limitation.
so I will get the Premium APIs soon, but I have some questions if you can answer me, please.
can you show me an example of json code for search in Twitter?

Thank you…
I used standard twitter API in R by used twitteR package for almost month. but as I mentioned before because of limitations I want to use premium API ,but It is my first time work with Json code and premium API so I am little confused, any advice or steps can help me?