Created on 05-07-201808:19 PM - edited 08-17-201907:27 AM
We can remove Sentiment if you don't want to install my custom processor:
This is what they look like:
I grab some fields I like:
These are fields I want to save:
This is a simple version of the flow to just ingest tweets, run sentiment analysis and store in directory as clean JSON.
You can drop the sentiment analysis and do it later. You can also run a python script for that.
We could make this simpler and just have GetTwitter then PutFile. This will store the RAW Twitter JSON file which is a very sparse nested JSON file. if you want the raw data, that is an option. It's a pain to work with that format and not perfect for analytics. I flatten it and just grab what I have seen as the core attributes, you can add more or drop some of them easily.
This is a simple version that could be used for Art or Personal Projects or anyone who wants to store their own tweets and related items.
You Need: Consumer Key (API Key) and Consumer Secret (API Secret)
Your Access Token
You Need: Access Token and Access Token Secret.
Make sure you keep the secrets secure as you don't want people tweeting in your name or reading your stuff.
You will place these in the GetTwitter processor. Click start once you add that. You can filter out languages like en for English and es for Spanish.
We just save these JSON files to a directory for later use. We could also aggregate them and compress them if you like. Or send them to an Amazon S3, email them, or whatever. We can also retweet those, but now we are getting fancy and we already wrote that article this morning.
Unzip it. On some Linux's you may need to apt-get install unzip or yum install unzip. You may need to be root, so you can do something like sudo su.
You will need Java installed. For a low cost small Linux server, you can use one of these two services, and they also tell you how to install Java. There are many low cost options. This application is small enough to also run on your laptop, an old desktop PC or a small cloud instance.