07-11-2016 03:22 PM
I'm trying out the Twitter analytics in SAS VA 7.3 and it appears when I access the twitter account, it only allows about a week's worth of data to be extracted. I don't see a place to put in a date range....any suggestions?
07-14-2016 04:27 AM
Hi @ldenney, good question,
According to the SAS VA User Guide (http://support.sas.com/documentation/cdl/en/vaug/68648/HTML/default/viewer.htm#n1w05z0ghdc44fn1f0swt...) SAS VA application has the restrictions that the Twitter API has.
Therefore, even if you do this by code you might find similar results.
On a try to help you, I found this great information and discussion, provided by @FalkoSchulz: http://blogs.sas.com/content/sascom/2013/12/12/how-to-import-twitter-tweets-in-sas-data-step-using-o...
This provides the way to import the Twitter data by code.
In the discussion below, I could find the following, textually:
The maximum number of tweets forhttps://api.twitter.com/1.1/search/tweets.json is 100 (API details are here). This blog entry was just a basic example to explain the general concept behind the authentication required as well as dealing with JSON results in SAS.
In order to get more than hundred tweets you would need to understand working with timelines (there is a guide with details). As a short summary you would introduce either a max_id parameter which specifies the max tweet ID you want to recieve - in other words you will get tweets older than this ID (there is also a since_id parameter which would return tweets younger than the one specified). In the past I was simply calling this macro x number of times in order to get multiple pages (each hundred tweets). On each call I'm appending the newly recieved tweets to a common tweet data set. I believe Twitter keeps about a one week history - so there is a natural limit how far back you can go. Initially you may have to run it a number of times - but in dialy or hourly batch job you may just have to deal with a few hundred dependent on your search term.
Hope this helps. Cheers, Falko
I hope to be able to help you a bit there.