How can I retrive the full archive of twits and not only the recent ones?
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!