TikTok Tweet 1.0 GA Release

Hey guys, I’m back again and very pleased to announce that TikTok Tweet 1.0 GA has just been released. This has been an exciting and rewarding journey of learning (and a little frustration!) for me, and I’m pleased to be able to give you a tour of the finished product.

Getting Started

Once you clone the repo from Github, you can check out the project’s structure:
Screen Shot 2015-04-23 at 4.41.58 PM

Go into the conf folder and right off the bat, you need to edit config.txt to your liking:
Screen Shot 2015-04-24 at 12.06.38 PM

[connection]
host = 127.0.0.1
keyspace = tiktok

Here you need to specify the address of your cluster/node, as well as the keyspace where the tweets and related data are going to be held. This is so that cqlengine can connect to your database.

[replies]
in_reply_to = @CassPopQuiz
account_id = 2815304775

Add “@YourUserName” and your twitter count id such that the program can collect replies to yor tweets

[conf]
CONSUMER_KEY = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CONSUMER_SECRET = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ACCESS_KEY = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ACCESS_SECRET = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Add your twitter auth information so that TikTok Tweet can have access to you Twitter account

[time]
my_time = 10

Set how frequently you would like TikTok Tweet to check the queues for new tweets to send (in seconds)

[db_settings]
keyspace = tiktok
host = 127.0.0.1
# for replication
strategy_class = SimpleStrategy
replication_factor = 1

database settings for the initial set up of the keyspace and tables. I’m am assuming the user has some knowledge of Cassandra replication strategies here.

Once you’ve set your config file, you can start up

$ bash job.sh

and the app should be available in your browser:

http://127.0.0.1:8000/tiktokadmin/

Create a Tweet

First type the text of your tweet into the Create a Tweet page (limit of 140 characters of course!)
Screen Shot 2015-04-24 at 3.08.36 PM

For now we are just going to save it in the database, not going to add it to a queue just yet. Just type in your tweet and hit the Create button.
Screen Shot 2015-04-24 at 3.09.18 PM
Now let’s create a queue though the Manage a Queue section. Give your new queue a name and hit Submit:
Screen Shot 2015-04-24 at 4.48.07 PM

Head into the Schedule a Tweet our tweet part of our app and find our tweet waiting to be added to a queue:
Screen Shot 2015-04-24 at 3.12.27 PM
Let’s add this to a queue. Set a date:
Screen Shot 2015-04-24 at 3.15.38 PM

…and time:
Screen Shot 2015-04-24 at 3.15.58 PM

Add viola! Our tweet appears on our timeline at approximately the time we chose:
Screen Shot 2015-04-24 at 3.31.49 PM

When someone responded to one of our tweets, it gets stored in our database:
Screen Shot 2015-04-24 at 3.37.10 PM

To see responses to tweets, to the Manage Responses section of the site and select the queue from which you would like to see associated responses:
Screen Shot 2015-04-24 at 3.37.41 PM

We can see the replies to our tweets in the order they came in
Screen Shot 2015-04-24 at 3.37.53 PM

I think this application will help me a lot in managing my daily Cassandra Pop Quiz on Twitter, now all I need is to come up with some great questions! Any body who wants to download the source good and give me some feedback, it would be much appreciated. This is the first full stack application I’ve completed all the way through, so I’m definitely looking for some helpful tips and hints. I’d still like to add some other features, like a UI for administration. I’ll be continuously looking for ways to improve this app and more cool features to add.

Advertisements

About Rebecca Mills

Biochemist by trade, transitioning to computer engineering.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s