How can I retrive the full archive of twits and not only the recent ones?

2 Ansichten (letzte 30 Tage)
Hello everyone, I am trying to retriving twitter data using the command getdata from MATLAB. to do that a twitter object c must be created.
c = twitter(ConsumerKey,ConsumerSecret,AccessToken,AccessTokenSecret);
This command requires 4 keys because it refers to standard projects and not academic ones (that are the ones who can access to all historical tweets for research purpose). The academic developers accounts have also a Bearer token which I can access to but I do not know where to give as an input to MATLAB to retrieve historical data.
At the moment I am able to retrieve recent data with this simple code here:
c = twitter(ConsumerKey,ConsumerSecret,AccessToken,AccessTokenSecret);
parameters.query = ‘covid -is:reply -is:retweet’;
parameters.max_results = 20;
d = getdata(c,baseurl,parameters);
but if I substitute the baseurl and I research for old twits the status is "Forbidden" Error 403 because I am not actually passing to MATLAB my academic credentials ( even if I have those)
baseurl = ‘https://api.twitter.com/2/tweets/search/all’;
parameters.start_time = ‘2021-03-27T17:19:24Z’;
parameters.end_time = ‘2021-03-30T18:19:24Z’;
There is any chance to pass them to MATLAB in order to enable the historical research?
Thank you in advance

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Produkte


Version

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by