AskTwitter

Our project, AskTwitter, aims to provide a crowd-sourcing community that allows Twitter users to post questions and answer them, too: much like Stack Overflow or Reddit. We're using Twitter to reduce hassle for our users who already have a Twitter account; to tap into a huge goldmine of existing questions; and to get rid of any overhead with creating our own user signup service.
Using PHP, HTML, CSS (Bootstrap), and MySQL, we made a web interface that is minimalistic and easy to use. Users are able to browse questions that have been posted to Twitter, and users with Twitter accounts can log in via Twitter to post their own questions and respond to questions.
Logging in is fast and secure due to the use of Twitter's API, accessed through the tmhOAuth library for PHP. This is also the tool through which Twitter's database of user-submitted tweets are collected and utilised for our application.
Further, users can filter tweets using a search term: either a username, or a search term (which can accept both bare terms as well as hashtags.

Third-party materials used:

  • WAMP - Apache/MySQL server for Windows
  • TwitterOAuth - Twitter API for PHP
  • Bootstrap.css

Built With

Share this project:

Updates

posted an update

Sunday 0900 - 1300: The final stretch!
With most of the functionality in place and implemented at this time, we spent most of the time cleaning up our code and changing very minor aesthetic aspects of the application without affecting the behaviour.
A banner/logo was made which replaced a plain Heading 1 format, colours of buttons were changed, location of other features were moved around, and attractive 'alert' messages were added (for example, when you successfully log out or post a tweet from the interface).
We made a start on logging what we did over the 24 hours (hi!) and began to plan the filming of the short demonstration video for submission.
Ahead of schedule, we managed to have a rather relaxed exit out of the competition!
We're looking forward to seeing what people think of AskTwitter, and of course what everyone else has made! A huge thank you to all staff members and sponsors behind UNIHACK 2015; we had a lot of fun and learned a lot! :D

Nathalia and David

Log in or sign up for Devpost to join the conversation.

posted an update

Saturday 2300 - Sunday 0900: More implementation.
We realised that PHP does not easily handle hashtables. In order to implement the feature that checks whether a tweet is published in English or not, we needed to use hashtables to store fairly large dictionary files. We would then have used the hash for O(1) search to check if words that comprise a tweet match with words found in the dictionary. If so, the word would contribute to the total percentage of words in the tweet that are English. A tweet above a certain threshold, say 80% to allow for slang or non-standard English, would be considered to be posted in English and hence displayed on the web interface.
Because this wasn't implemented, a large number of tweets displayed on the website are not in English. However, this may mean that a wider audience will use our application!
Besides this, the rest of the features were implemented. It was not without struggle - many energy drinks were consumed and icecream/cookie breaks were had. David slept for a grand total of 0 minutes, and Nathalia slept for 20 + 30 + 10 = 60 minutes over the 24+ hours (including time spent not hacking). Numerous test tweets were sent from both David and Nathalia's accounts, resulting in a lot of confusion from their followers.

Log in or sign up for Devpost to join the conversation.

posted an update

1600 - 2300: This was a time of great change and strife.
We decided to use PHP instead of Python as neither of us had experience with Django (even though Python is nice to use and quick to learn). Both of us had experience with PHP, so we switched to the Twitter API for PHP, tmhOAuth.
The change meant that we had lost some time, but David was fast to adapt and set up the ground work for the application. Once we had a solid connection with Twitter's wealth of data, we began to think in more detail about the functionality we'd implement, and who would do what.
Functionality was to include:

  • Displaying questions from Twitter users (most recent posts)
  • Viewing responses to those questions
  • Creating a database to store upvotes and downvotes for each question (with the idea that funny or interesting questions get more votes)
  • The ability to log in to your Twitter account via the web interface
  • The ability to respond to questions from the web interface
  • Identify which tweets are in English and filter out the rest

We started working on all of the above features!

Log in or sign up for Devpost to join the conversation.

posted an update

Saturday, 1430 - 1500: We both immediately set to work on setting up the framework of our respective responsibilities.
We had initially agreed to use Python and, subsequently, one of the more popular platforms for web development using Python: Django. We both prepared our Twitter accounts for developing. David, with more backend experience, was to set up the connection between Python and the Twitter API, using Tweepy. There was a lot of trying to figure out how the OAuth keys and consumer keys etc. worked with each other before an application could be granted access. Nathalia, with her (somewhat limited) experience in frontend web development, began working on the loose framework of the user-facing side of the website. She used HTML 5 and CSS in the form of Bootstrap.css to help with formatting. There were some interesting seminars during this time, too!

Log in or sign up for Devpost to join the conversation.

posted an update

Saturday, 1420: Planned the general overview of our project using paper prototyping - quick and dirty.
Our project, Ask Twitter, aims to provide a crowd-sourcing community that allows Twitter users to post questions and answer them, too: much like Stack Overflow or Reddit. We're using Twitter to reduce hassle for our users who already have a Twitter account; to tap into a huge goldmine of existing questions; and to get rid of any overhead with creating our own user signup service.
Using PHP, HTML, CSS (Bootstrap), and MySQL, we made a web interface that is minimalistic and easy to use. Users are able to browse questions that have been posted to Twitter, and users with Twitter accounts can log in via Twitter to post their own questions and respond to questions.
Logging in is fast and secure due to the use of Twitter's API, accessed through the tmhOAuth library for PHP. This is also the tool through which Twitter's database of user-submitted tweets are collected and utilised for our application.
Further, users can filter tweets using a search term: either a username, or a search term (which can accept both bare terms as well as hashtags.

Log in or sign up for Devpost to join the conversation.

posted an update

Saturday, 1100: Prepared our GitHub accounts for the hackathon! Saturday, 1200: Checked out the mini careers fair. Saturday, 1330: Hilarious and super quick presentations from a Braintree rep and Developer Steve. Saturday, 1410: Hacking begins!

Log in or sign up for Devpost to join the conversation.